Just Merch API
Store APIAdmin API
Store APIAdmin API
Discord
  1. Admin API
  • Intro
  • Create order
    POST
  • Get Order
    GET
  1. Admin API

Create order

POST
/v1/orders

Request

Authorization
Add parameter in header
x-api-key
Example:
x-api-key: ********************
Body Params application/json
Represents the input data required for creating a fulfillment order.
id
string 
optional
The order id. Use the originating order id to keep it simple and easy to query later. It only has to be unique to you.
Example:
XJ4-8817
shipping_address
object 
required
The shipping address details for the order.
name
string 
required
The full name of the recipient.
Example:
Elon Musk
address_1
string 
required
The primary address line.
Example:
321 Starbase Way
address_2
string 
optional
The secondary address line (optional).
Example:
Unit 42
city
string 
required
The city name.
Example:
Los Angeles
state
string 
required
The state or province name.
Example:
CA
country
string 
required
The country name.
Example:
US
postal_code
string 
required
The postal or ZIP code.
Example:
90210
phone
string 
optional
The contact phone number (optional).
Example:
310-123-4321
shipping_speed
enum<string> 
required
The shipping method to be used for the order.
Allowed values:
normalfastfastest
items
array [object {3}] 
required
An array of items to be fulfilled in the order.
sku
string 
required
The Stock Keeping Unit (SKU) identifier for the item.
Example:
BXJ117
quantity
integer 
required
The quantity of the item to be fulfilled.
Example:
1
placements
array [object {2}] 
required
An array of placements for the item.
revenue
number 
optional
Revenue you collected from the customer. So that we can show you awesome profit charts 📈
Example
{
    "id": "XJ4-8817",
    "shipping_address": {
        "name": "Elon Musk",
        "address_1": "321 Starbase Way",
        "address_2": "Unit 42",
        "city": "Los Angeles",
        "state": "CA",
        "country": "US",
        "postal_code": "90210",
        "phone": "310-123-4321"
    },
    "shipping_speed": "normal",
    "items": [
        {
            "sku": "BXJ117",
            "quantity": 1,
            "placements": [
                {
                    "label": "front",
                    "image": {
                        "url": "http://.../public.jpg",
                        "alignment": "center",
                        "tile": false
                    }
                }
            ]
        }
    ],
    "revenue": 0
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://localhost:8083/v1/orders' \
--header 'Content-Type: application/json' \
--header 'x-api-key;' \
--data-raw '{
    "id": "XJ4-8817",
    "shipping_address": {
        "name": "Elon Musk",
        "address_1": "321 Starbase Way",
        "address_2": "Unit 42",
        "city": "Los Angeles",
        "state": "CA",
        "country": "US",
        "postal_code": "90210",
        "phone": "310-123-4321"
    },
    "shipping_speed": "normal",
    "items": [
        {
            "sku": "BXJ117",
            "quantity": 1,
            "placements": [
                {
                    "label": "front",
                    "image": {
                        "url": "http://.../public.jpg",
                        "alignment": "center",
                        "tile": false
                    }
                }
            ]
        }
    ],
    "revenue": 0
}'

Responses

🟢200Success
application/json
Body
Represents the input data required for creating a fulfillment order.
id
string 
required
Example:
550e8400-e29b-41d4-a716-446655440000
shipping_address
object 
required
The shipping address details for the order.
name
string 
required
The full name of the recipient.
Example:
Elon Musk
address_1
string 
required
The primary address line.
Example:
321 Starbase Way
address_2
string 
optional
The secondary address line (optional).
Example:
Unit 42
city
string 
required
The city name.
Example:
Los Angeles
state
string 
required
The state or province name.
Example:
CA
country
string 
required
The country name.
Example:
US
postal_code
string 
required
The postal or ZIP code.
Example:
90210
phone
string 
optional
The contact phone number (optional).
Example:
310-123-4321
shipping_speed
enum<string> 
required
The shipping method to be used for the order.
Allowed values:
normalfastfastest
items
array [object {3}] 
required
An array of items to be fulfilled in the order.
sku
string 
required
The Stock Keeping Unit (SKU) identifier for the item.
Example:
BXJ117
quantity
integer 
required
The quantity of the item to be fulfilled.
Example:
1
placements
array [object {2}] 
required
An array of placements for the item.
status
enum<string> 
required
status
Allowed values:
newawaiting_paymentpaidmanufacturingshippeddeliveredcancelledrefundedon_hold
Example
{
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "shipping_address": {
        "name": "Elon Musk",
        "address_1": "321 Starbase Way",
        "address_2": "Unit 42",
        "city": "Los Angeles",
        "state": "CA",
        "country": "US",
        "postal_code": "90210",
        "phone": "310-123-4321"
    },
    "shipping_speed": "normal",
    "items": [
        {
            "sku": "BXJ117",
            "quantity": 1,
            "placements": [
                {
                    "label": "front",
                    "image": {
                        "url": "http://.../public.jpg",
                        "alignment": "center",
                        "tile": false
                    }
                }
            ]
        }
    ],
    "status": "new"
}
Previous
Intro
Next
Get Order
Built with