POST
/
buy

Headers

authorization
string
required

Your API key for authentication.

Body

items
array
required

Array of items to purchase.

[
  {
    "variant_id": "string", // Shopify variant ID
    "quantity": 1 // Must be at least 1
  }
]
user_id
string
required

The unique identifier for the user.

store_id
string
required

The unique identifier for the store.

Response

message
string

A message indicating the result of the purchase operation.

code
string

A code indicating the result of the purchase operation. Possible values:

  • ORDER_CREATED: Order created successfully
  • AUTH_MISSING: No API key provided
  • INVALID_KEY: Invalid API key
  • BAD_REQUEST_ERROR: Invalid request parameters
  • STORE_NOT_FOUND: Store ID not found
  • USER_NOT_FOUND: User ID not found
  • STORE_NOT_VERIFIED: Store is not verified yet
  • FORBIDDEN: Not authorized to access store
  • INTERNAL_ERROR: Server error occurred
error
string

Error message if the request fails.