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\": \"skylar90@example.org\",
\"password\": \"kYEc%&_b\"
}"
const url = new URL(
"https://api.rjrcenterport.com/api/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "skylar90@example.org",
"password": "kYEc%&_b"
};
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.
Refresh Token.
requires authentication
Example request:
curl --request POST \
"https://api.rjrcenterport.com/api/refresh-token" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.rjrcenterport.com/api/refresh-token"
);
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):
{
"token": "example-token",
"expire": "expire date"
}
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.
Endpoints
GET api/tidio_get_customer
Example request:
curl --request GET \
--get "https://api.rjrcenterport.com/api/tidio_get_customer" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"bette10@example.org\"
}"
const url = new URL(
"https://api.rjrcenterport.com/api/tidio_get_customer"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "bette10@example.org"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Server Error"
}
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 api/v1/tidio_track_order
Example request:
curl --request GET \
--get "https://api.rjrcenterport.com/api/v1/tidio_track_order" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"order_id\": \"omnis\",
\"email\": \"smith.owen@example.com\"
}"
const url = new URL(
"https://api.rjrcenterport.com/api/v1/tidio_track_order"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"order_id": "omnis",
"email": "smith.owen@example.com"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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 api/v1/tidio_create_ticket
Example request:
curl --request POST \
"https://api.rjrcenterport.com/api/v1/tidio_create_ticket" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"order_id\": \"velit\",
\"email\": \"valentin.jast@example.org\",
\"description\": \"Sed non perferendis ut in saepe repellat quia.\",
\"issue_type\": \"wrong_order\",
\"preferred_resolution\": \"refund\",
\"photos\": [
\"http:\\/\\/kreiger.biz\\/\"
]
}"
const url = new URL(
"https://api.rjrcenterport.com/api/v1/tidio_create_ticket"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"order_id": "velit",
"email": "valentin.jast@example.org",
"description": "Sed non perferendis ut in saepe repellat quia.",
"issue_type": "wrong_order",
"preferred_resolution": "refund",
"photos": [
"http:\/\/kreiger.biz\/"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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/395" \
--header "Authorization: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.rjrcenterport.com/api/v1/order/395"
);
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\": \"modi\",
\"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\": true
}"
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": "modi",
"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": true
};
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.
POST - Quote
Example request:
curl --request POST \
"https://api.rjrcenterport.com/api/v1/quote" \
--header "Authorization: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"lines\": [
{
\"warehouseId\": \"CP\",
\"partId\": \"B00760002\",
\"quantity\": 2
},
{
\"warehouseId\": \"SAN\",
\"partId\": \"B00760004\",
\"quantity\": 1
}
]
}"
const url = new URL(
"https://api.rjrcenterport.com/api/v1/quote"
);
const headers = {
"Authorization": "Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"lines": [
{
"warehouseId": "CP",
"partId": "B00760002",
"quantity": 2
},
{
"warehouseId": "SAN",
"partId": "B00760004",
"quantity": 1
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"items": [
{
"partId": "B00760002",
"warehouseId": "CP",
"quantity": 2,
"unitPrice": "3.85",
"extendedPrice": "7.70"
}
],
"subtotal": "7.70",
"shippingCost": "0.00",
"orderAmount": "7.70",
"note": "Sales tax is calculated when the order is submitted and is not included here."
}
Example response (404):
{
"error": "Validation failed",
"messages": "Insufficient quantity available for these items B00760002"
}
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/315478108.06" \
--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/315478108.06"
);
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\": \"veniam\",
\"gtins\": \"9\",
\"partIds\": \"eum\",
\"skus\": \"inventore\",
\"page\": 26
}"
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": "veniam",
"gtins": "9",
"partIds": "eum",
"skus": "inventore",
"page": 26
};
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.