Skip to main content
PUT
/
dev
/
v1
/
orders
/
{id}
Replace order affiliate attribution
curl --request PUT \
  --url https://api.shoppex.io/dev/v1/orders/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "referral_code": "creator123"
}
'
{
  "data": {
    "id": "inv_put_1",
    "uniqid": "dddddddd-dddd-4ddd-8ddd-dddddddddddd",
    "shop_id": "shop_1",
    "customer_id": null,
    "customer_email": "buyer@example.com",
    "affiliate_link_id": "link_1",
    "affiliate_customer_id": "cus_aff_1",
    "affiliate_code": "creator123",
    "affiliate_discount_amount": 0,
    "currency": "USD",
    "status": "PENDING",
    "payment_status": "PENDING",
    "gateway": "MANUAL",
    "flow_type": "MANUAL_CONFIRMATION",
    "provider_reference": "ref_put_1",
    "provider_reference_type": "MANUAL_REFERENCE",
    "subtotal": 10,
    "discount": 0,
    "total": 10,
    "custom_fields": null,
    "checkout_url": null,
    "items": [
      {
        "product_id": "prod_1",
        "product_title": "Starter Pack",
        "product_type": "SERVICE",
        "variant_title": null,
        "quantity": 1,
        "unit_price": 10,
        "total": 10
      }
    ],
    "created_at": 1711956000,
    "updated_at": 1711956300
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.shoppex.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Use your Shoppex API key in the Authorization header.

Path Parameters

id
string
required

Body

affiliate_code
string | null
affiliateCode
string | null
referral_code
string | null
referralCode
string | null
affiliate_id
string | null
affiliateId
string | null

Response

Successful response

data
object
required