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"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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": ""
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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>ins=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
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.