Reseller Orders

Reseller Orders API allows you to List, Retrieve and Create Orders, Update order Contents, Process and Cancel orders, Manage and Track order fulfilment.


Reseller Order View

View reseller order by Order ID

Request Parameters


order_id (Required)
Validation Rule : required|numeric

View order by ID.


Response Parameters


order_id
Data Type : numeric

Order ID.


created_at
Data Type : date

Order creation date


delivered_at
Data Type : date

Order delivery date (null before delivery)


status
Data Type : integer

General status { 1 : Saved Order, 2 : Pending Order, 3 : Pending Action, 4 : In Transit, 5 : Delivered, 6 : Returned, 7 : Failed , 7 : Canceled, 8 : Declined }


customer
Data Type : present|array

Array of Customer Properties

customer_id
Data Type : numeric
Product ID
first_name
Data Type : string
Product ID
last_name
Data Type : string
Product ID
phone
Data Type : string
Customer phone with international prefix

address_to
Data Type : present|array

Array of Address Properties

address_id
Data Type : numeric
Address ID
address_1
Data Type : string
Address 1
address_2
Data Type : nullable|string
Address 2
city
Data Type : string
City
state_code
Data Type : string
State Code
country_code
Data Type : string|max:2
Country Code
zip_code
Data Type : string
ZIP Code

transactions
Data Type : present|array

Array of Transactions - In case this field is not populated, order will have no transactions (results in empty order). Empty orders are used in case of full api integration for interactive order population and processing.

transaction_id
Data Type : integer
ID of transaction
sku
Data Type : string|exists:products,vendor_sku
SKU of the product
quantity
Data Type : numeric
Quantity of the product
status
Data Type : integer
General status { 1 : Saved Order, 2 : Pending Order, 3 : Pending Action, 4 : In Transit, 5 : Delivered, 6 : Returned, 7 : Failed , 7 : Canceled, 8 : Declined }

parcels
Data Type : present|array

Array of Parcels

parcel
Data Type : present|array
Array of Parcel Data
id
Data Type : integer
ID of the Parcel
status
Data Type : string
Parcel transportation status { PRE_TRANSIT, TRANSIT, DELIVERED, RETURNED, FAILED }
carrier
Data Type : string
Carrier Name
tracking_number
Data Type : string
Tracking number for carrier
content
Data Type : present|array
Array of Parcels
sku
Data Type : string|exists:products,vendor_sku
SKU of the product
quantity
Data Type : required|numeric
Quantity of the product
status
Data Type : integer
General status { 1 : Saved Order, 2 : Pending Order, 3 : Pending Action, 4 : In Transit, 5 : Delivered, 6 : Returned, 7 : Failed , 7 : Canceled, 8 : Declined }
POST /api/TDApi/ResellerOrder/view
curl --location --request POST 'https://topdawg.com/api/TDApi/ResellerOrder/view' \
--header 'Authorization: Bearer INSERT_TOKEN_INSTEAD_IF_THIS_TAG \
--header 'Content-Type: application/json' \
--data-raw '{
    "order_id": "18453"
}'
Request Body (Raw Data)
{
    "order_id": "18453"
}
Response
{
    "order_id": "18453",
    "created_at": "2021-06-10",
    "delivered_at": "2021-06-10",
    "status": "1",
    "customer": {
        "customer_id": "2884",
        "first_name": "Leroy",
        "last_name": "Jenkins",
        "phone": "1 234 567 89 01"
    },
    "address_to": {
        "address_id": "2442",
        "address_1": "123 Main Street",
        "address_2": "APT 111",
        "city": "Edison",
        "state_code": "NJ",
        "country_code": "US",
        "zip_code": "08818"
    },
    "transactions": [
        {
            "transaction_id": "24662",
            "sku": "19-99994738846",
            "quantity": 3,
            "status": "1"
        }
    ],
    "parcels": [
        {
            "parcel": {
                "id": "262",
                "status": "PRE_TRANSIT",
                "carrier": "USPS",
                "tracking_number": "92612901755477000000000010"
            },
            "content": [
                {
                    "sku": "19-99994738846",
                    "quantity": 3,
                    "status": "1"
                }
            ]
        }
    ]
}

Create

Create Order. And optionally flag it not to be processed automatically.

Request Parameters


auto_process (Optional)
Validation Rule : boolean

Automatically process order (Generate Shipping Costs and Pay order), Field is optional and by default is enabled. {auto_process : false} to Place un-processed orders for further manual processing.


customer (Required)
Validation Rule : required|present|array

Array of Customer Properties

customer_id (Optional)
Validation Rule : numeric
Product ID
first_name (Required)
Validation Rule : required|string
Customer first name
last_name (Required)
Validation Rule : required|string
Customer last name
phone (Required)
Validation Rule : required|string
Customer phone with international prefix

address_to (Required)
Validation Rule : required|present|array

Array of Delivery Address Properties

address_id (Optional)
Validation Rule : numeric
Address ID
address_1 (Required)
Validation Rule : required|string
Address 1
address_2 (Optional)
Validation Rule : nullable|string
Address 2
city (Required)
Validation Rule : required|string
City
state_code (Required)
Validation Rule : required|string
State Code
country_code (Required)
Validation Rule : required|string|max:2
Country Code
zip_code (Required)
Validation Rule : required|string
ZIP Code

transactions (Optional)
Validation Rule : present|array

Array of Transactions

sku (Required)
Validation Rule : required|string|exists:products,vendor_sku
SKU of the product
quantity (Required)
Validation Rule : required|numeric|min:0
Quantity of the product

Response Parameters


order_id
Data Type : required|integer

Order ID


status
Data Type : required|integer

Processing status of the Order, Status 1 is default status on order creation.

POST /api/TDApi/ResellerOrder/create
curl --location --request POST 'https://topdawg.com/api/TDApi/ResellerOrder/create' \
--header 'Authorization: Bearer INSERT_TOKEN_INSTEAD_IF_THIS_TAG \
--header 'Content-Type: application/json' \
--data-raw '{
    "customer": {
        "customer_id": "2884",
        "first_name": "Leroy",
        "last_name": "Jenkins",
        "phone": "1 234 567 89 01"
    },
    "address_to": {
        "address_id": "2442",
        "address_1": "123 Main Street",
        "address_2": "APT 111",
        "city": "Edison",
        "state_code": "NJ",
        "country_code": "US",
        "zip_code": "08818"
    },
    "transactions": [
        {
            "sku": "19-99994738846",
            "quantity": 3
        }
    ]
}'
Request Body (Raw Data)
{
    "customer": {
        "customer_id": "2884",
        "first_name": "Leroy",
        "last_name": "Jenkins",
        "phone": "1 234 567 89 01"
    },
    "address_to": {
        "address_id": "2442",
        "address_1": "123 Main Street",
        "address_2": "APT 111",
        "city": "Edison",
        "state_code": "NJ",
        "country_code": "US",
        "zip_code": "08818"
    },
    "transactions": [
        {
            "sku": "19-99994738846",
            "quantity": 3
        }
    ]
}
Response
{
    "order_id": "15533",
    "status": "1"
}