MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can retrieve your token by visiting your dashboard and clicking Generate API token.

Authentication

Authentication.

Example request:
curl --request POST \
    "https://api.rjrcenterport.com/api/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"lindsey.lemke@example.com\",
    \"password\": \"xXGh?^r-<hU\'e\\\"I0.uT\"
}"
const url = new URL(
    "https://api.rjrcenterport.com/api/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "lindsey.lemke@example.com",
    "password": "xXGh?^r-<hU'e\"I0.uT"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
  "token": "example-token",
  "expire":"expire date"
  "user": {
    "id": 1,
    "name": "John Doe",
    "email": "john@example.com"
  }
}
 

Request      

POST api/login

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

Email address of registered wholesale account. Example: lindsey.lemke@example.com

password   string   

The password for the wholesale account. Example: xXGh?^r-<hU'e"I0.uT

Log out the authenticated user.

requires authentication

Example request:
curl --request POST \
    "https://api.rjrcenterport.com/api/logout" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.rjrcenterport.com/api/logout"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "message": "Logged out"
}
 

Request      

POST api/logout

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Orders

This endpoint list of active styles that will need to get the product information.

GET - Order

Example request:
curl --request GET \
    --get "https://api.rjrcenterport.com/api/v1/order/4484622.2009704" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.rjrcenterport.com/api/v1/order/4484622.2009704"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "orderId": 0,
    "invoiceNo": "",
    "poNumber": "",
    "orderDate": "",
    "orderStatus": "Shipped",
    "shippingAddress": {
        "firstName": "",
        "lastName": "",
        "company": "",
        "address": "",
        "address2": "",
        "city": "",
        "state": "",
        "country": "",
        "zip": ""
    },
    "billingAddress": {
        "firstName": "",
        "lastName": "",
        "company": "",
        "address": "",
        "address2": "",
        "city": "",
        "state": "",
        "country": "",
        "zip": ""
    },
    "subtotal": "0.00",
    "shippingcost": "0.00",
    "sales_tax": "0.00",
    "orderamount": "0.00",
    "lines": [
        {
            "warehouseId": "SAN",
            "trackingNumber": "",
            "shipmentDate": "",
            "carrier": "",
            "volume": 0,
            "weight": 0,
            "items": [
                {
                    "partId": "",
                    "quantity": 0
                }
            ]
        }
    ]
}
 

Example response (404):


{
    "error": "Product not found"
}
 

Request      

GET api/v1/order/{orderId}

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

orderId   number   

Example: 4484622.2009704

POST - Order

Example request:
curl --request POST \
    "https://api.rjrcenterport.com/api/v1/orderpo" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"poNumber\": \"voluptatem\",
    \"autoselectWarehouse\": true,
    \"shippingAddress\": {
        \"firstName\": \"\\\"John\\\"\",
        \"lastName\": \"\\\"Doe\\\"\",
        \"address\": \"\\\"123 Main St\\\"\",
        \"city\": \"\\\"Bolingbrook\\\"\",
        \"state\": \"\\\"IL\\\"\",
        \"zip\": \"\\\"60440\\\"\",
        \"company\": \"\\\"Doe\\\"\",
        \"address2\": \"\\\"123 Main St\\\"\",
        \"residential\": true
    },
    \"lines\": [
        {
            \"warehouseId\": \"CP\",
            \"partId\": \"B00760002\",
            \"quantity\": 2
        },
        {
            \"warehouseId\": \"SAN\",
            \"partId\": \"B00760004\",
            \"quantity\": 1
        }
    ],
    \"shipBlind\": true,
    \"emailConfirmation\": false,
    \"testOrder\": false
}"
const url = new URL(
    "https://api.rjrcenterport.com/api/v1/orderpo"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "poNumber": "voluptatem",
    "autoselectWarehouse": true,
    "shippingAddress": {
        "firstName": "\"John\"",
        "lastName": "\"Doe\"",
        "address": "\"123 Main St\"",
        "city": "\"Bolingbrook\"",
        "state": "\"IL\"",
        "zip": "\"60440\"",
        "company": "\"Doe\"",
        "address2": "\"123 Main St\"",
        "residential": true
    },
    "lines": [
        {
            "warehouseId": "CP",
            "partId": "B00760002",
            "quantity": 2
        },
        {
            "warehouseId": "SAN",
            "partId": "B00760004",
            "quantity": 1
        }
    ],
    "shipBlind": true,
    "emailConfirmation": false,
    "testOrder": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


["order_id":999]
 

Request      

POST api/v1/orderpo

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

poNumber   string   

Customer PO Number Example: voluptatem

autoselectWarehouse   boolean   

Example: true

shippingAddress   object   

The shipping address details.

firstName   string   

The name of the customer. Example: "John"

lastName   string  optional  

optional The attention-to name for delivery. Example: "Doe"

address   string   

The street address. Example: "123 Main St"

city   string   

The city. Example: "Bolingbrook"

state   string   

The state abbreviation. Example: "IL"

zip   string   

The postal code. Example: "60440"

company   string  optional  

optional The attention-to name for delivery. Example: "Doe"

address2   string  optional  

optional The street address. Example: "123 Main St"

residential   boolean   

Whether the address is residential. Example: true

lines   string[]   

The list of line items in the order.

partId   string   

The part ID of the item. Example: "B00760002"

quantity   integer   

The quantity of the item to order. Example: 2

warehouseId   string   

The warehouse ID where the item is stored. Example: "CP"

shipBlind   boolean  optional  

Example: true

emailConfirmation   boolean  optional  

Example: false

testOrder   boolean  optional  

Example: false

GET - Order Status

Example request:
curl --request GET \
    --get "https://api.rjrcenterport.com/api/v1/order_status/1588.655" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.rjrcenterport.com/api/v1/order_status/1588.655"
);

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "orderId": "0",
    "invoiceNo": "",
    "orderDate": "",
    "orderStatus": ""
}
 

Request      

GET api/v1/order_status/{orderId}

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

orderId   number   

Example: 1588.655

Products

This endpoint list of active styles that will need to get the product information.

GET - Styles

Example request:
curl --request GET \
    --get "https://api.rjrcenterport.com/api/v1/styles?styles=G500%2CG800&search=Gildan" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.rjrcenterport.com/api/v1/styles"
);

const params = {
    "styles": "G500,G800",
    "search": "Gildan",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


[
    {
        "sku": "G500",
        "productName": "Adult Heavy Cotton T-Shirts",
        "brand": "Gildan",
        "category": "T-Shirts"
    },
    {
        "sku": "G185",
        "productName": "Adult Heavy Blend 8 oz Hood",
        "brand": "Gildan",
        "category": "Hoodies"
    }
]
 

Request      

GET api/v1/styles

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

styles   string  optional  

Get Multiple products by using commas Example: G500,G800

search   string  optional  

Filters by search keyword, sku, category, brand Example: Gildan

GET - Product

Example request:
curl --request GET \
    --get "https://api.rjrcenterport.com/api/v1/product/G500?partId=CP0003683&search=Black" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.rjrcenterport.com/api/v1/product/G500"
);

const params = {
    "partId": "CP0003683",
    "search": "Black",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


[
"style": "G500",
"productName": "Adult Heavy Cotton 5.3 oz T-Shirt",
"description": "For any crafter of custom t-shirts there are few blank t-shirt options better than the coveted Gildan G500.",
"brand": "Gildan",
"department": "Mens",
"productType": "No Pocket",
"fit": "Classic Fit",
"feature": "Pre-Shrunk||Heavyweight",
"fabric": "100% Cotton||Organic Cotton",
"family": "Garment",
"parts":[{
     "partId": "CP0000009486",
     "gtin": "00821780001350",
     "color": "Daisy",
     "swatch": "#F9F46F",
     "size": "L",
     "weight": 0.455,
     "height": 0.18,
     "width": 15.75,
     "depth": 21,
    "images":[{
        "type":"front",
        "url":"G500_DAISY_front.jpg"
    },{
        "type":"back",
        "url":"G500_DAISY_back.jpg"
    }],
    "cdnUrl":"https://logoup-static-assets.s3.amazonaws.com/Alldayshirts_ProductImages/",
}]
]
 

Example response (404):


{
    "error": "Product not found"
}
 

Request      

GET api/v1/product/{style}

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

style   string   

The Style of the product. Example: G500

Query Parameters

partId   string  optional  

For multiple pass with comma separated. Example: CP0003683

search   string  optional  

Filters by search keyword, color, size and gtin. Example: Black

GET - Price

Example request:
curl --request GET \
    --get "https://api.rjrcenterport.com/api/v1/price/G500?partId=CP0003683&search=Black" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.rjrcenterport.com/api/v1/price/G500"
);

const params = {
    "partId": "CP0003683",
    "search": "Black",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


[{
     "partId": "CP0000009486",
     "price": "00821780001350",
     "name": "Daisy",
}]
 

Example response (404):


{
    "error": "Product not found"
}
 

Request      

GET api/v1/price/{style?}

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

style   string   

The Style of the product. Example: G500

Query Parameters

partId   string  optional  

For multiple pass with comma separated. Example: CP0003683

search   string  optional  

Filters by search keyword, color, size and gtin. Example: Black

GET - Inventory

Example request:
curl --request GET \
    --get "https://api.rjrcenterport.com/api/v1/inventory/G500?partId=CP0003683&search=Black" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.rjrcenterport.com/api/v1/inventory/G500"
);

const params = {
    "partId": "CP0003683",
    "search": "Black",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


[{
     "partId": "CP0000009486",
     "color": "Black",
     "size" :"XL",
     "parts": [{
         "warehouseId"=>"CP",
         "warehouseName"=>"Fort Lauderdale, FL",
         "quantity"=>999,
     }]
}]
 

Example response (404):


{
    "error": "Product not found"
}
 

Request      

GET api/v1/inventory/{style?}

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

style   string   

The Style of the product. Example: G500

Query Parameters

partId   string  optional  

For multiple pass with comma separated. Example: CP0003683

search   string  optional  

Filters by search keyword, color, size and gtin. Example: Black

GET - Products

requires authentication

Get a list of active styles and product info.

Example request:
curl --request GET \
    --get "https://api.rjrcenterport.com/api/v1/products?fields=sku%2CpartId%2Cgtin%2Cprice%2Cqty&gtins=00821780058739&partIds=CP0000009494&skus=G500%2CG800" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"fields\": \"illum\",
    \"gtins\": \"01\",
    \"partIds\": \"quia\",
    \"skus\": \"illo\",
    \"page\": 56
}"
const url = new URL(
    "https://api.rjrcenterport.com/api/v1/products"
);

const params = {
    "fields": "sku,partId,gtin,price,qty",
    "gtins": "00821780058739",
    "partIds": "CP0000009494",
    "skus": "G500,G800",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "fields": "illum",
    "gtins": "01",
    "partIds": "quia",
    "skus": "illo",
    "page": 56
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "sku": "G500",
            "partId": "CP0000009494",
            "gtin": "00821780058739",
            "caseQty": 72,
            "color": "Dark Chocolate",
            "size": "2XL",
            "price": "3.85",
            "qty": 10330,
            "qtyLocation": [
                {
                    "warehouseId": "CP",
                    "warehouseName": "Fort Lauderdale, FL",
                    "quantity": 689
                },
                {
                    "warehouseId": "SAN",
                    "warehouseName": "San Antonio, TX",
                    "quantity": 331
                }
            ]
        }
    ],
    "pagination": {
        "page": 1,
        "limit": 500,
        "total_records": 689,
        "next_page": 2
    }
}
 

Request      

GET api/v1/products

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

fields   string  optional  

Optional. Comma-separated list of fields to return. Example: sku,partId,gtin,price,qty

gtins   string  optional  

Optional. Comma-separated GTINs to filter. Example: 00821780058739

partIds   string  optional  

Optional. Comma-separated PartIds to filter. Example: CP0000009494

skus   string  optional  

Optional. Comma-separated SKUs to filter. Example: G500,G800

Body Parameters

fields   string  optional  

Example: illum

gtins   string  optional  

Must match the regex /^[0-9,]+$/. Example: 01

partIds   string  optional  

Example: quia

skus   string  optional  

Example: illo

page   integer  optional  

Must be at least 1. Example: 56