Yodify API v1.0
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Authentication
oAuth2 authentication.
- Flow: clientCredentials
- Token URL = https://auth.yodify.com/connect/token
Scope | Scope Description |
---|---|
yodify | Yodify API |
Accounts
Retrieve a List of Accounts
A maximum of 100 records can be requested at once. If more records are needed, a page can be supplied to get the next set of records. If no IDs are supplied, all available Accounts (up to the maximum) will be returned.
Code samples
# You can also use wget
curl -X GET /api/v1/Accounts \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/Accounts";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/Accounts', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/Accounts', headers = headers)
print(r.json())
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Accounts',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/Accounts',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/Accounts
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Ids | query | array[integer] | false | The IDs of the objects that are being requested. |
Page | query | integer(int32) | false | The page of the results. |
Limit | query | integer(int32) | false | A limit on the number of objects to be returned, between 1 and 100. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Example responses
200 Response
{
"object": "list",
"data": [
{}
],
"has_more": true,
"total_items": 0,
"url": "string",
"count": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Accounts successfully retrieved. | Accounts |
400 | Bad Request | Accounts could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden. | None |
429 | Too Many Requests | API call quota exceeded. | None |
Create a New Account
Code samples
# You can also use wget
curl -X POST /api/v1/Accounts \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePostRequest()
{
string url = "/api/v1/Accounts";
string json = @"{
""client_identifier"": """",
""discount_level_id"": 999,
""name"": ""Account Name"",
""account_number"": ""ACCOUNT_001"",
""payment_terms"": ""Net7"",
""custom_payment_terms"": ""string"",
""customer_type"": ""My Custom Customer Type"",
""industry"": ""Office Equipment"",
""city"": ""Seattle"",
""state_code"": ""WA"",
""country_code"": ""US"",
""postal_code"": ""11234"",
""street1"": ""111 example street"",
""street2"": ""Unit 123"",
""email"": ""jason@example.com"",
""phone_number"": ""1-123-555-1234"",
""user_accounts"": [
{}
]
}";
AccountRequest content = JsonConvert.DeserializeObject(json);
await PostAsync(content, url);
}
/// Performs a POST Request
public async Task PostAsync(AccountRequest content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute POST request
HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
}
/// Serialize an object to Json
private StringContent SerializeObject(AccountRequest content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api/v1/Accounts', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/api/v1/Accounts', headers = headers)
print(r.json())
const inputBody = '{
"client_identifier": "",
"discount_level_id": 999,
"name": "Account Name",
"account_number": "ACCOUNT_001",
"payment_terms": "Net7",
"custom_payment_terms": "string",
"customer_type": "My Custom Customer Type",
"industry": "Office Equipment",
"city": "Seattle",
"state_code": "WA",
"country_code": "US",
"postal_code": "11234",
"street1": "111 example street",
"street2": "Unit 123",
"email": "jason@example.com",
"phone_number": "1-123-555-1234",
"user_accounts": [
{}
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Accounts',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/api/v1/Accounts',
params: {
}, headers: headers
p JSON.parse(result)
POST /api/v1/Accounts
Body parameter
{
"client_identifier": "",
"discount_level_id": 999,
"name": "Account Name",
"account_number": "ACCOUNT_001",
"payment_terms": "Net7",
"custom_payment_terms": "string",
"customer_type": "My Custom Customer Type",
"industry": "Office Equipment",
"city": "Seattle",
"state_code": "WA",
"country_code": "US",
"postal_code": "11234",
"street1": "111 example street",
"street2": "Unit 123",
"email": "jason@example.com",
"phone_number": "1-123-555-1234",
"user_accounts": [
{}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | AccountRequest | false | The Account to be created. |
client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
discount_level_id | body | integer (int64) | false | The ID of the DiscountLevel that the account is attached to. |
name | body | string ¦ null | false | The unique name of the account. |
account_number | body | string ¦ null | false | The unique account number associated with the account. |
payment_terms | body | string | false | Payment terms are limited to the following pre-defined values: |
custom_payment_terms | body | string ¦ null | false | none |
customer_type | body | string ¦ null | false | The customer type of the account. |
industry | body | string ¦ null | false | The industry that the account is associated with. |
city | body | string ¦ null | false | The city or town of the account. |
state_code | body | string ¦ null | false | The two letter state or province code that corresponds to the state or province of the account. |
country_code | body | string ¦ null | false | The two letter country code the corresponds to the country of the account. |
postal_code | body | string ¦ null | false | The zip or postal code of the account. |
street1 | body | string ¦ null | false | The primary mailing address of the account. |
street2 | body | string ¦ null | false | An additional mailing address for the account. |
body | string ¦ null | false | The email address of the primary contact for the account. | |
phone_number | body | string ¦ null | false | The phone number at the address of the account. |
user_accounts | body | [AccountUserRequest] ¦ null | false | Include this list of AccountUser to create account users for the account. |
» client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
» account_id | body | integer (int64) | false | The ID of the Account that the account user is attached to. |
» discount_level_id | body | integer (int64) | false | The ID of the DiscountLevel that the account user is attached to. |
» first_name | body | string ¦ null | false | The first name of the account user. |
» last_name | body | string ¦ null | false | The last name of the account user. |
» salutation | body | string ¦ null | false | The salutation of the account user. |
body | string ¦ null | false | The email address of the account user. This must be unique. When an account | |
» title | body | string ¦ null | false | The title of the account user. |
» department | body | string ¦ null | false | The department of the account user. |
» phone_number | body | string ¦ null | false | The phone number of the account user. |
Detailed descriptions
payment_terms: Payment terms are limited to the following pre-defined values: - Net7 - Net10 - Net15 - Net30 - Net60 - Net90 - CreditCard - CashOnDelivery - DueOnReceipt - EndOfMonth - PaymentInAdvance - Custom
» email: The email address of the account user. This must be unique. When an account user is first created, an email will be sent to this address.
This field cannot be updated after an account user is created.
Enumerated Values
Parameter | Value |
---|---|
payment_terms | NET7 |
payment_terms | NET10 |
payment_terms | NET15 |
payment_terms | NET30 |
payment_terms | NET60 |
payment_terms | NET90 |
payment_terms | CreditCard |
payment_terms | CashOnDelivery |
payment_terms | DueOnReceipt |
payment_terms | EndOfMonth |
payment_terms | PaymentInAdvance |
payment_terms | FifteenthOfMonth |
payment_terms | NET45 |
payment_terms | Custom |
payment_terms | TwoTenNET30 |
payment_terms | TwoTenNET45 |
payment_terms | TwoTenNET60 |
payment_terms | TwoTenNET90 |
Example responses
200 Response
{
"client_identifier": "",
"id": 12321,
"object": "account",
"discount_level": {
"id": 12321,
"object": "discountlevel",
"client_identifier": "",
"name": "loyalty discount",
"description": "Discount for regular customers.",
"brand_discounts": [],
"accounts": [],
"created_on": "2020-12-01T08:00:00.000Z"
},
"created_on": "2020-12-01T08:00:00.000Z",
"discount_level_id": 999,
"name": "Account Name",
"account_number": "ACCOUNT_001",
"payment_terms": "Net7",
"custom_payment_terms": "string",
"customer_type": "My Custom Customer Type",
"industry": "Office Equipment",
"city": "Seattle",
"state_code": "WA",
"country_code": "US",
"postal_code": "11234",
"street1": "111 example street",
"street2": "Unit 123",
"email": "jason@example.com",
"phone_number": "1-123-555-1234",
"user_accounts": [
{}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Account was successfully updated. | Account |
400 | Bad Request | Account could not be updated. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden. | None |
429 | Too Many Requests | API call quota exceeded. | None |
Retrieve an Account
Code samples
# You can also use wget
curl -X GET /api/v1/Accounts/{id} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/Accounts/{id}";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/Accounts/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/Accounts/{id}', headers = headers)
print(r.json())
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Accounts/{id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/Accounts/{id}',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/Accounts/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the account being requested. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Example responses
200 Response
{
"client_identifier": "",
"id": 12321,
"object": "account",
"discount_level": {
"id": 12321,
"object": "discountlevel",
"client_identifier": "",
"name": "loyalty discount",
"description": "Discount for regular customers.",
"brand_discounts": [],
"accounts": [],
"created_on": "2020-12-01T08:00:00.000Z"
},
"created_on": "2020-12-01T08:00:00.000Z",
"discount_level_id": 999,
"name": "Account Name",
"account_number": "ACCOUNT_001",
"payment_terms": "Net7",
"custom_payment_terms": "string",
"customer_type": "My Custom Customer Type",
"industry": "Office Equipment",
"city": "Seattle",
"state_code": "WA",
"country_code": "US",
"postal_code": "11234",
"street1": "111 example street",
"street2": "Unit 123",
"email": "jason@example.com",
"phone_number": "1-123-555-1234",
"user_accounts": [
{}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Account successfully retrieved. | Account |
400 | Bad Request | Account could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden. | None |
429 | Too Many Requests | API call quota exceeded. | None |
Update an Account
Code samples
# You can also use wget
curl -X PUT /api/v1/Accounts/{id} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePutRequest()
{
int id = 1;
string url = "/api/v1/Accounts/{id}";
string json = @"{
""client_identifier"": """",
""discount_level_id"": 999,
""name"": ""Account Name"",
""account_number"": ""ACCOUNT_001"",
""payment_terms"": ""Net7"",
""custom_payment_terms"": ""string"",
""customer_type"": ""My Custom Customer Type"",
""industry"": ""Office Equipment"",
""city"": ""Seattle"",
""state_code"": ""WA"",
""country_code"": ""US"",
""postal_code"": ""11234"",
""street1"": ""111 example street"",
""street2"": ""Unit 123"",
""email"": ""jason@example.com"",
""phone_number"": ""1-123-555-1234"",
""user_accounts"": [
{}
]
}";
AccountRequest content = JsonConvert.DeserializeObject(json);
var result = await PutAsync(id, content, url);
}
/// Performs a PUT Request
public async Task PutAsync(int id, AccountRequest content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute PUT request
HttpResponseMessage response = await Client.PutAsync(url + $"/{id}", jsonContent);
//Return response
return await DeserializeObject(response);
}
/// Serialize an object to Json
private StringContent SerializeObject(AccountRequest content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','/api/v1/Accounts/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.put('/api/v1/Accounts/{id}', headers = headers)
print(r.json())
const inputBody = '{
"client_identifier": "",
"discount_level_id": 999,
"name": "Account Name",
"account_number": "ACCOUNT_001",
"payment_terms": "Net7",
"custom_payment_terms": "string",
"customer_type": "My Custom Customer Type",
"industry": "Office Equipment",
"city": "Seattle",
"state_code": "WA",
"country_code": "US",
"postal_code": "11234",
"street1": "111 example street",
"street2": "Unit 123",
"email": "jason@example.com",
"phone_number": "1-123-555-1234",
"user_accounts": [
{}
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Accounts/{id}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.put '/api/v1/Accounts/{id}',
params: {
}, headers: headers
p JSON.parse(result)
PUT /api/v1/Accounts/{id}
Body parameter
{
"client_identifier": "",
"discount_level_id": 999,
"name": "Account Name",
"account_number": "ACCOUNT_001",
"payment_terms": "Net7",
"custom_payment_terms": "string",
"customer_type": "My Custom Customer Type",
"industry": "Office Equipment",
"city": "Seattle",
"state_code": "WA",
"country_code": "US",
"postal_code": "11234",
"street1": "111 example street",
"street2": "Unit 123",
"email": "jason@example.com",
"phone_number": "1-123-555-1234",
"user_accounts": [
{}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the account that will be updated. |
body | body | AccountRequest | false | The Account to be updated. |
client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
discount_level_id | body | integer (int64) | false | The ID of the DiscountLevel that the account is attached to. |
name | body | string ¦ null | false | The unique name of the account. |
account_number | body | string ¦ null | false | The unique account number associated with the account. |
payment_terms | body | string | false | Payment terms are limited to the following pre-defined values: |
custom_payment_terms | body | string ¦ null | false | none |
customer_type | body | string ¦ null | false | The customer type of the account. |
industry | body | string ¦ null | false | The industry that the account is associated with. |
city | body | string ¦ null | false | The city or town of the account. |
state_code | body | string ¦ null | false | The two letter state or province code that corresponds to the state or province of the account. |
country_code | body | string ¦ null | false | The two letter country code the corresponds to the country of the account. |
postal_code | body | string ¦ null | false | The zip or postal code of the account. |
street1 | body | string ¦ null | false | The primary mailing address of the account. |
street2 | body | string ¦ null | false | An additional mailing address for the account. |
body | string ¦ null | false | The email address of the primary contact for the account. | |
phone_number | body | string ¦ null | false | The phone number at the address of the account. |
user_accounts | body | [AccountUserRequest] ¦ null | false | Include this list of AccountUser to create account users for the account. |
» client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
» account_id | body | integer (int64) | false | The ID of the Account that the account user is attached to. |
» discount_level_id | body | integer (int64) | false | The ID of the DiscountLevel that the account user is attached to. |
» first_name | body | string ¦ null | false | The first name of the account user. |
» last_name | body | string ¦ null | false | The last name of the account user. |
» salutation | body | string ¦ null | false | The salutation of the account user. |
body | string ¦ null | false | The email address of the account user. This must be unique. When an account | |
» title | body | string ¦ null | false | The title of the account user. |
» department | body | string ¦ null | false | The department of the account user. |
» phone_number | body | string ¦ null | false | The phone number of the account user. |
Detailed descriptions
payment_terms: Payment terms are limited to the following pre-defined values: - Net7 - Net10 - Net15 - Net30 - Net60 - Net90 - CreditCard - CashOnDelivery - DueOnReceipt - EndOfMonth - PaymentInAdvance - Custom
» email: The email address of the account user. This must be unique. When an account user is first created, an email will be sent to this address.
This field cannot be updated after an account user is created.
Enumerated Values
Parameter | Value |
---|---|
payment_terms | NET7 |
payment_terms | NET10 |
payment_terms | NET15 |
payment_terms | NET30 |
payment_terms | NET60 |
payment_terms | NET90 |
payment_terms | CreditCard |
payment_terms | CashOnDelivery |
payment_terms | DueOnReceipt |
payment_terms | EndOfMonth |
payment_terms | PaymentInAdvance |
payment_terms | FifteenthOfMonth |
payment_terms | NET45 |
payment_terms | Custom |
payment_terms | TwoTenNET30 |
payment_terms | TwoTenNET45 |
payment_terms | TwoTenNET60 |
payment_terms | TwoTenNET90 |
Example responses
200 Response
{
"client_identifier": "",
"id": 12321,
"object": "account",
"discount_level": {
"id": 12321,
"object": "discountlevel",
"client_identifier": "",
"name": "loyalty discount",
"description": "Discount for regular customers.",
"brand_discounts": [],
"accounts": [],
"created_on": "2020-12-01T08:00:00.000Z"
},
"created_on": "2020-12-01T08:00:00.000Z",
"discount_level_id": 999,
"name": "Account Name",
"account_number": "ACCOUNT_001",
"payment_terms": "Net7",
"custom_payment_terms": "string",
"customer_type": "My Custom Customer Type",
"industry": "Office Equipment",
"city": "Seattle",
"state_code": "WA",
"country_code": "US",
"postal_code": "11234",
"street1": "111 example street",
"street2": "Unit 123",
"email": "jason@example.com",
"phone_number": "1-123-555-1234",
"user_accounts": [
{}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Account was successfully created. | Account |
400 | Bad Request | Account could not be created. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden. | None |
429 | Too Many Requests | API call quota exceeded. | None |
Delete an Account
Code samples
# You can also use wget
curl -X DELETE /api/v1/Accounts/{id} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeDeleteRequest()
{
int id = 1;
string url = "/api/v1/Accounts/{id}";
await DeleteAsync(id, url);
}
/// Performs a DELETE Request
public async Task DeleteAsync(int id, string url)
{
//Execute DELETE request
HttpResponseMessage response = await Client.DeleteAsync(url + $"/{id}");
//Return response
await DeserializeObject(response);
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','/api/v1/Accounts/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.delete('/api/v1/Accounts/{id}', headers = headers)
print(r.json())
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Accounts/{id}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.delete '/api/v1/Accounts/{id}',
params: {
}, headers: headers
p JSON.parse(result)
DELETE /api/v1/Accounts/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the account to be deleted. |
Example responses
200 Response
{
"client_identifier": "",
"id": 12321,
"object": "account",
"discount_level": {
"id": 12321,
"object": "discountlevel",
"client_identifier": "",
"name": "loyalty discount",
"description": "Discount for regular customers.",
"brand_discounts": [],
"accounts": [],
"created_on": "2020-12-01T08:00:00.000Z"
},
"created_on": "2020-12-01T08:00:00.000Z",
"discount_level_id": 999,
"name": "Account Name",
"account_number": "ACCOUNT_001",
"payment_terms": "Net7",
"custom_payment_terms": "string",
"customer_type": "My Custom Customer Type",
"industry": "Office Equipment",
"city": "Seattle",
"state_code": "WA",
"country_code": "US",
"postal_code": "11234",
"street1": "111 example street",
"street2": "Unit 123",
"email": "jason@example.com",
"phone_number": "1-123-555-1234",
"user_accounts": [
{}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Account was successfully deleted. | Account |
400 | Bad Request | Account could not be deleted. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden. | None |
429 | Too Many Requests | API call quota exceeded. | None |
AccountUsers
Retrieve a List of Account Users
A maximum of 100 records can be requested at once. If more records are needed, a page can be supplied to get the next set of records. If no IDs are supplied, all available Account Users (up to the maximum) will be returned.
Code samples
# You can also use wget
curl -X GET /api/v1/AccountUsers \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/AccountUsers";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/AccountUsers', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/AccountUsers', headers = headers)
print(r.json())
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/AccountUsers',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/AccountUsers',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/AccountUsers
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Ids | query | array[integer] | false | The IDs of the objects that are being requested. |
Page | query | integer(int32) | false | The page of the results. |
Limit | query | integer(int32) | false | A limit on the number of objects to be returned, between 1 and 100. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Example responses
200 Response
{
"object": "list",
"data": [
{}
],
"has_more": true,
"total_items": 0,
"url": "string",
"count": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Account Users successfully retrieved. | AccountUsers |
400 | Bad Request | Account Users could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Create a New Account User
Code samples
# You can also use wget
curl -X POST /api/v1/AccountUsers \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePostRequest()
{
string url = "/api/v1/AccountUsers";
string json = @"{
""client_identifier"": """",
""account_id"": 999,
""discount_level_id"": 0,
""first_name"": ""Madison"",
""last_name"": ""Smith"",
""salutation"": ""Mr."",
""email"": ""user@example.com"",
""title"": ""job title"",
""department"": ""Department name"",
""phone_number"": ""1-123-555-1234""
}";
AccountUserRequest content = JsonConvert.DeserializeObject(json);
await PostAsync(content, url);
}
/// Performs a POST Request
public async Task PostAsync(AccountUserRequest content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute POST request
HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
}
/// Serialize an object to Json
private StringContent SerializeObject(AccountUserRequest content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api/v1/AccountUsers', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/api/v1/AccountUsers', headers = headers)
print(r.json())
const inputBody = '{
"client_identifier": "",
"account_id": 999,
"discount_level_id": 0,
"first_name": "Madison",
"last_name": "Smith",
"salutation": "Mr.",
"email": "user@example.com",
"title": "job title",
"department": "Department name",
"phone_number": "1-123-555-1234"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/AccountUsers',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/api/v1/AccountUsers',
params: {
}, headers: headers
p JSON.parse(result)
POST /api/v1/AccountUsers
Body parameter
{
"client_identifier": "",
"account_id": 999,
"discount_level_id": 0,
"first_name": "Madison",
"last_name": "Smith",
"salutation": "Mr.",
"email": "user@example.com",
"title": "job title",
"department": "Department name",
"phone_number": "1-123-555-1234"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | AccountUserRequest | false | none |
client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
account_id | body | integer (int64) | false | The ID of the Account that the account user is attached to. |
discount_level_id | body | integer (int64) | false | The ID of the DiscountLevel that the account user is attached to. |
first_name | body | string ¦ null | false | The first name of the account user. |
last_name | body | string ¦ null | false | The last name of the account user. |
salutation | body | string ¦ null | false | The salutation of the account user. |
body | string ¦ null | false | The email address of the account user. This must be unique. When an account | |
title | body | string ¦ null | false | The title of the account user. |
department | body | string ¦ null | false | The department of the account user. |
phone_number | body | string ¦ null | false | The phone number of the account user. |
Detailed descriptions
email: The email address of the account user. This must be unique. When an account user is first created, an email will be sent to this address.
This field cannot be updated after an account user is created.
Example responses
200 Response
{
"client_identifier": "",
"id": "12321",
"object": "accountuser",
"discount_level": {
"id": 12321,
"object": "discountlevel",
"client_identifier": "",
"name": "loyalty discount",
"description": "Discount for regular customers.",
"brand_discounts": [],
"accounts": [],
"created_on": "2020-12-01T08:00:00.000Z"
},
"account": {
"client_identifier": "",
"id": 12321,
"object": "account",
"discount_level": {},
"created_on": "2020-12-01T08:00:00.000Z",
"discount_level_id": 999,
"name": "Account Name",
"account_number": "ACCOUNT_001",
"payment_terms": "Net7",
"custom_payment_terms": "string",
"customer_type": "My Custom Customer Type",
"industry": "Office Equipment",
"city": "Seattle",
"state_code": "WA",
"country_code": "US",
"postal_code": "11234",
"street1": "111 example street",
"street2": "Unit 123",
"email": "jason@example.com",
"phone_number": "1-123-555-1234",
"user_accounts": []
},
"created_on": "2020-12-01T08:00:00.000Z",
"account_id": 999,
"discount_level_id": 0,
"first_name": "Madison",
"last_name": "Smith",
"salutation": "Mr",
"email": "user@example.com",
"title": "Director",
"department": "Department name",
"phone_number": "1-123-555-1234"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Account User was successfully updated. | AccountUser |
400 | Bad Request | Account User could not be updated. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Retrieve an Account User
Code samples
# You can also use wget
curl -X GET /api/v1/AccountUsers/{id} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/AccountUsers/{id}";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/AccountUsers/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/AccountUsers/{id}', headers = headers)
print(r.json())
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/AccountUsers/{id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/AccountUsers/{id}',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/AccountUsers/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | The ID of the Account User being requested. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Example responses
200 Response
{
"client_identifier": "",
"id": "12321",
"object": "accountuser",
"discount_level": {
"id": 12321,
"object": "discountlevel",
"client_identifier": "",
"name": "loyalty discount",
"description": "Discount for regular customers.",
"brand_discounts": [],
"accounts": [],
"created_on": "2020-12-01T08:00:00.000Z"
},
"account": {
"client_identifier": "",
"id": 12321,
"object": "account",
"discount_level": {},
"created_on": "2020-12-01T08:00:00.000Z",
"discount_level_id": 999,
"name": "Account Name",
"account_number": "ACCOUNT_001",
"payment_terms": "Net7",
"custom_payment_terms": "string",
"customer_type": "My Custom Customer Type",
"industry": "Office Equipment",
"city": "Seattle",
"state_code": "WA",
"country_code": "US",
"postal_code": "11234",
"street1": "111 example street",
"street2": "Unit 123",
"email": "jason@example.com",
"phone_number": "1-123-555-1234",
"user_accounts": []
},
"created_on": "2020-12-01T08:00:00.000Z",
"account_id": 999,
"discount_level_id": 0,
"first_name": "Madison",
"last_name": "Smith",
"salutation": "Mr",
"email": "user@example.com",
"title": "Director",
"department": "Department name",
"phone_number": "1-123-555-1234"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Account User successfully retrieved. | AccountUser |
400 | Bad Request | Account User could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Update an Account User
Code samples
# You can also use wget
curl -X PUT /api/v1/AccountUsers/{id} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePutRequest()
{
int id = 1;
string url = "/api/v1/AccountUsers/{id}";
string json = @"{
""client_identifier"": """",
""account_id"": 999,
""discount_level_id"": 0,
""first_name"": ""Madison"",
""last_name"": ""Smith"",
""salutation"": ""Mr."",
""email"": ""user@example.com"",
""title"": ""job title"",
""department"": ""Department name"",
""phone_number"": ""1-123-555-1234""
}";
AccountUserRequest content = JsonConvert.DeserializeObject(json);
var result = await PutAsync(id, content, url);
}
/// Performs a PUT Request
public async Task PutAsync(int id, AccountUserRequest content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute PUT request
HttpResponseMessage response = await Client.PutAsync(url + $"/{id}", jsonContent);
//Return response
return await DeserializeObject(response);
}
/// Serialize an object to Json
private StringContent SerializeObject(AccountUserRequest content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','/api/v1/AccountUsers/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.put('/api/v1/AccountUsers/{id}', headers = headers)
print(r.json())
const inputBody = '{
"client_identifier": "",
"account_id": 999,
"discount_level_id": 0,
"first_name": "Madison",
"last_name": "Smith",
"salutation": "Mr.",
"email": "user@example.com",
"title": "job title",
"department": "Department name",
"phone_number": "1-123-555-1234"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/AccountUsers/{id}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.put '/api/v1/AccountUsers/{id}',
params: {
}, headers: headers
p JSON.parse(result)
PUT /api/v1/AccountUsers/{id}
Body parameter
{
"client_identifier": "",
"account_id": 999,
"discount_level_id": 0,
"first_name": "Madison",
"last_name": "Smith",
"salutation": "Mr.",
"email": "user@example.com",
"title": "job title",
"department": "Department name",
"phone_number": "1-123-555-1234"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | The ID of the account User that will be updated. |
body | body | AccountUserRequest | false | The Account User to be updated. |
client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
account_id | body | integer (int64) | false | The ID of the Account that the account user is attached to. |
discount_level_id | body | integer (int64) | false | The ID of the DiscountLevel that the account user is attached to. |
first_name | body | string ¦ null | false | The first name of the account user. |
last_name | body | string ¦ null | false | The last name of the account user. |
salutation | body | string ¦ null | false | The salutation of the account user. |
body | string ¦ null | false | The email address of the account user. This must be unique. When an account | |
title | body | string ¦ null | false | The title of the account user. |
department | body | string ¦ null | false | The department of the account user. |
phone_number | body | string ¦ null | false | The phone number of the account user. |
Detailed descriptions
email: The email address of the account user. This must be unique. When an account user is first created, an email will be sent to this address.
This field cannot be updated after an account user is created.
Example responses
200 Response
{
"client_identifier": "",
"id": "12321",
"object": "accountuser",
"discount_level": {
"id": 12321,
"object": "discountlevel",
"client_identifier": "",
"name": "loyalty discount",
"description": "Discount for regular customers.",
"brand_discounts": [],
"accounts": [],
"created_on": "2020-12-01T08:00:00.000Z"
},
"account": {
"client_identifier": "",
"id": 12321,
"object": "account",
"discount_level": {},
"created_on": "2020-12-01T08:00:00.000Z",
"discount_level_id": 999,
"name": "Account Name",
"account_number": "ACCOUNT_001",
"payment_terms": "Net7",
"custom_payment_terms": "string",
"customer_type": "My Custom Customer Type",
"industry": "Office Equipment",
"city": "Seattle",
"state_code": "WA",
"country_code": "US",
"postal_code": "11234",
"street1": "111 example street",
"street2": "Unit 123",
"email": "jason@example.com",
"phone_number": "1-123-555-1234",
"user_accounts": []
},
"created_on": "2020-12-01T08:00:00.000Z",
"account_id": 999,
"discount_level_id": 0,
"first_name": "Madison",
"last_name": "Smith",
"salutation": "Mr",
"email": "user@example.com",
"title": "Director",
"department": "Department name",
"phone_number": "1-123-555-1234"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Account User was successfully created. | AccountUser |
400 | Bad Request | Account User could not be created. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Delete an Account User
Code samples
# You can also use wget
curl -X DELETE /api/v1/AccountUsers/{id} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeDeleteRequest()
{
int id = 1;
string url = "/api/v1/AccountUsers/{id}";
await DeleteAsync(id, url);
}
/// Performs a DELETE Request
public async Task DeleteAsync(int id, string url)
{
//Execute DELETE request
HttpResponseMessage response = await Client.DeleteAsync(url + $"/{id}");
//Return response
await DeserializeObject(response);
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','/api/v1/AccountUsers/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.delete('/api/v1/AccountUsers/{id}', headers = headers)
print(r.json())
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/AccountUsers/{id}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.delete '/api/v1/AccountUsers/{id}',
params: {
}, headers: headers
p JSON.parse(result)
DELETE /api/v1/AccountUsers/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | The ID of the account User to be deleted. |
Example responses
200 Response
{
"client_identifier": "",
"id": "12321",
"object": "accountuser",
"discount_level": {
"id": 12321,
"object": "discountlevel",
"client_identifier": "",
"name": "loyalty discount",
"description": "Discount for regular customers.",
"brand_discounts": [],
"accounts": [],
"created_on": "2020-12-01T08:00:00.000Z"
},
"account": {
"client_identifier": "",
"id": 12321,
"object": "account",
"discount_level": {},
"created_on": "2020-12-01T08:00:00.000Z",
"discount_level_id": 999,
"name": "Account Name",
"account_number": "ACCOUNT_001",
"payment_terms": "Net7",
"custom_payment_terms": "string",
"customer_type": "My Custom Customer Type",
"industry": "Office Equipment",
"city": "Seattle",
"state_code": "WA",
"country_code": "US",
"postal_code": "11234",
"street1": "111 example street",
"street2": "Unit 123",
"email": "jason@example.com",
"phone_number": "1-123-555-1234",
"user_accounts": []
},
"created_on": "2020-12-01T08:00:00.000Z",
"account_id": 999,
"discount_level_id": 0,
"first_name": "Madison",
"last_name": "Smith",
"salutation": "Mr",
"email": "user@example.com",
"title": "Director",
"department": "Department name",
"phone_number": "1-123-555-1234"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Account User was successfully deleted. | AccountUser |
400 | Bad Request | Account User could not be deleted. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Addresses
Retrieve a List of Addresses
A maximum of 100 records can be requested at once. If more records are needed, a page can be supplied to get the next set of records. If no IDs are supplied, all available Addresses (up to the maximum) will be returned.
Code samples
# You can also use wget
curl -X GET /api/v1/Addresses \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/Addresses";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/Addresses', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/Addresses', headers = headers)
print(r.json())
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Addresses',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/Addresses',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/Addresses
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Ids | query | array[integer] | false | The IDs of the objects that are being requested. |
Page | query | integer(int32) | false | The page of the results. |
Limit | query | integer(int32) | false | A limit on the number of objects to be returned, between 1 and 100. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Example responses
200 Response
{
"object": "list",
"data": [
{}
],
"has_more": true,
"total_items": 0,
"url": "string",
"count": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Addresses successfully retrieved. | Addresss |
400 | Bad Request | Addresses could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Create a New Address
Code samples
# You can also use wget
curl -X POST /api/v1/Addresses \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePostRequest()
{
string url = "/api/v1/Addresses";
string json = @"{
""client_identifier"": ""string"",
""name"": ""Main Office"",
""first_name"": ""string"",
""last_name"": ""string"",
""company_name"": ""string"",
""city"": ""Main Office"",
""state_code"": ""TX"",
""country_code"": ""US"",
""street1"": ""915 W Dallas St"",
""street2"": ""Unit 112"",
""postal_code"": ""77019"",
""phone_number"": ""+1 713-123-1234"",
""is_primary"": true,
""is_warehouse"": true
}";
AddressRequest content = JsonConvert.DeserializeObject(json);
await PostAsync(content, url);
}
/// Performs a POST Request
public async Task PostAsync(AddressRequest content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute POST request
HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
}
/// Serialize an object to Json
private StringContent SerializeObject(AddressRequest content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api/v1/Addresses', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/api/v1/Addresses', headers = headers)
print(r.json())
const inputBody = '{
"client_identifier": "string",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Addresses',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/api/v1/Addresses',
params: {
}, headers: headers
p JSON.parse(result)
POST /api/v1/Addresses
Body parameter
{
"client_identifier": "string",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | AddressRequest | false | The Address to be created. |
client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
name | body | string ¦ null | false | Gets or sets the name of the address. |
first_name | body | string ¦ null | false | The first name of the address contact. |
last_name | body | string ¦ null | false | The last name of the address contact. |
company_name | body | string ¦ null | false | The company name of the address contact. |
city | body | string ¦ null | false | Gets or sets the city. |
state_code | body | string ¦ null | false | Gets or sets the two-letter abbreviation of the state or province. |
country_code | body | string ¦ null | false | Gets or sets the two-letter code (ISO 3166-1 alpha-2 two-letter country code) for the country |
street1 | body | string ¦ null | false | Gets or sets the street address |
street2 | body | string ¦ null | false | Optional field for additional information for the street address |
postal_code | body | string ¦ null | false | The zip or postal code |
phone_number | body | string ¦ null | false | The phone number |
is_primary | body | boolean | false | Is this your main address. Not updateable |
is_warehouse | body | boolean | false | Is this address only a warehouse? Will not show up on contact pages when true. |
Example responses
201 Response
{
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Address was successfully updated. | None |
201 | Created | Created | Address |
400 | Bad Request | Address could not be updated. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Retrieve an Address
Code samples
# You can also use wget
curl -X GET /api/v1/Addresses/{id} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/Addresses/{id}";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/Addresses/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/Addresses/{id}', headers = headers)
print(r.json())
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Addresses/{id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/Addresses/{id}',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/Addresses/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the Address being requested. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Example responses
200 Response
{
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Address successfully retrieved. | Address |
400 | Bad Request | Address could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Update an Address
Code samples
# You can also use wget
curl -X PUT /api/v1/Addresses/{id} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePutRequest()
{
int id = 1;
string url = "/api/v1/Addresses/{id}";
string json = @"{
""client_identifier"": ""string"",
""name"": ""Main Office"",
""first_name"": ""string"",
""last_name"": ""string"",
""company_name"": ""string"",
""city"": ""Main Office"",
""state_code"": ""TX"",
""country_code"": ""US"",
""street1"": ""915 W Dallas St"",
""street2"": ""Unit 112"",
""postal_code"": ""77019"",
""phone_number"": ""+1 713-123-1234"",
""is_primary"": true,
""is_warehouse"": true
}";
AddressRequest content = JsonConvert.DeserializeObject(json);
var result = await PutAsync(id, content, url);
}
/// Performs a PUT Request
public async Task PutAsync(int id, AddressRequest content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute PUT request
HttpResponseMessage response = await Client.PutAsync(url + $"/{id}", jsonContent);
//Return response
return await DeserializeObject(response);
}
/// Serialize an object to Json
private StringContent SerializeObject(AddressRequest content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','/api/v1/Addresses/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.put('/api/v1/Addresses/{id}', headers = headers)
print(r.json())
const inputBody = '{
"client_identifier": "string",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Addresses/{id}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.put '/api/v1/Addresses/{id}',
params: {
}, headers: headers
p JSON.parse(result)
PUT /api/v1/Addresses/{id}
Body parameter
{
"client_identifier": "string",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the Address that will be updated. |
body | body | AddressRequest | false | The Address to be updated. |
client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
name | body | string ¦ null | false | Gets or sets the name of the address. |
first_name | body | string ¦ null | false | The first name of the address contact. |
last_name | body | string ¦ null | false | The last name of the address contact. |
company_name | body | string ¦ null | false | The company name of the address contact. |
city | body | string ¦ null | false | Gets or sets the city. |
state_code | body | string ¦ null | false | Gets or sets the two-letter abbreviation of the state or province. |
country_code | body | string ¦ null | false | Gets or sets the two-letter code (ISO 3166-1 alpha-2 two-letter country code) for the country |
street1 | body | string ¦ null | false | Gets or sets the street address |
street2 | body | string ¦ null | false | Optional field for additional information for the street address |
postal_code | body | string ¦ null | false | The zip or postal code |
phone_number | body | string ¦ null | false | The phone number |
is_primary | body | boolean | false | Is this your main address. Not updateable |
is_warehouse | body | boolean | false | Is this address only a warehouse? Will not show up on contact pages when true. |
Example responses
200 Response
{
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Address was successfully created. | Address |
400 | Bad Request | Address could not be created. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Delete an Address
Code samples
# You can also use wget
curl -X DELETE /api/v1/Addresses/{id} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeDeleteRequest()
{
int id = 1;
string url = "/api/v1/Addresses/{id}";
await DeleteAsync(id, url);
}
/// Performs a DELETE Request
public async Task DeleteAsync(int id, string url)
{
//Execute DELETE request
HttpResponseMessage response = await Client.DeleteAsync(url + $"/{id}");
//Return response
await DeserializeObject(response);
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','/api/v1/Addresses/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.delete('/api/v1/Addresses/{id}', headers = headers)
print(r.json())
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Addresses/{id}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.delete '/api/v1/Addresses/{id}',
params: {
}, headers: headers
p JSON.parse(result)
DELETE /api/v1/Addresses/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the Address to be deleted. |
Example responses
200 Response
{
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Address was successfully deleted. | Address |
400 | Bad Request | Address could not be deleted. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
BrandDiscounts
Retrieve a List of Brand Discounts
A maximum of 100 records can be requested at once. If more records are needed, a page can be supplied to get the next set of records. If no IDs are supplied, all available Brand Discounts (up to the maximum) will be returned.
Code samples
# You can also use wget
curl -X GET /api/v1/BrandDiscounts \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/BrandDiscounts";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/BrandDiscounts', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/BrandDiscounts', headers = headers)
print(r.json())
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/BrandDiscounts',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/BrandDiscounts',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/BrandDiscounts
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Ids | query | array[integer] | false | The IDs of the objects that are being requested. |
Page | query | integer(int32) | false | The page of the results. |
Limit | query | integer(int32) | false | A limit on the number of objects to be returned, between 1 and 100. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Example responses
200 Response
{
"object": "list",
"data": [
{}
],
"has_more": true,
"total_items": 0,
"url": "string",
"count": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Brand Discounts successfully retrieved. | BrandDiscounts |
400 | Bad Request | Brand Discounts could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Create a New Brand Discount
Code samples
# You can also use wget
curl -X POST /api/v1/BrandDiscounts \
-H 'Content-Type: application/json' \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePostRequest()
{
string url = "/api/v1/BrandDiscounts";
string json = @"{
""brand_discount_id"": 997,
""client_identifier"": """",
""brand_id"": 999,
""discount_level_id"": 999,
""percent_discount"": 25
}";
BrandDiscountRequest content = JsonConvert.DeserializeObject(json);
await PostAsync(content, url);
}
/// Performs a POST Request
public async Task PostAsync(BrandDiscountRequest content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute POST request
HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
}
/// Serialize an object to Json
private StringContent SerializeObject(BrandDiscountRequest content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api/v1/BrandDiscounts', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/api/v1/BrandDiscounts', headers = headers)
print(r.json())
const inputBody = '{
"brand_discount_id": 997,
"client_identifier": "",
"brand_id": 999,
"discount_level_id": 999,
"percent_discount": 25
}';
const headers = {
'Content-Type':'application/json',
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/BrandDiscounts',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/api/v1/BrandDiscounts',
params: {
}, headers: headers
p JSON.parse(result)
POST /api/v1/BrandDiscounts
Body parameter
{
"brand_discount_id": 997,
"client_identifier": "",
"brand_id": 999,
"discount_level_id": 999,
"percent_discount": 25
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | BrandDiscountRequest | false | The Brand Discount to be created. |
brand_discount_id | body | integer (int64) | false | The ID associated with the Brand Discount. |
client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
brand_id | body | integer (int64) | false | The ID of the Brand that the Brand Discount is attached to. |
discount_level_id | body | integer (int64) | false | The ID of the DiscountLevel that the Brand Discount is attached to. |
percent_discount | body | number (double) | false | The discount percentage. This must be a value from 0 to 100. |
Example responses
200 Response
{"id":12321,"object":"branddiscount","client_identifier":"","brand_id":999,"brand":{"client_identifier":"","name":"Brand Name","alias":"Brand Alias","id":92590,"object":"brand","created_on":"2020-12-01T08:00:00.000Z"},"discount_level_id":999,"discount_level":{"id":12321,"object":"discountlevel","client_identifier":"","name":"loyalty discount","description":"Discount for regular customers.","brand_discounts":[],"accounts":[],"created_on":"2020-12-01T08:00:00.000Z"},"percent_discount":25,"created_on":"2020-12-01T08:00:00.000Z"}
{
"id": 12321,
"object": "branddiscount",
"client_identifier": "",
"brand_id": 999,
"brand": {
"client_identifier": "",
"name": "Brand Name",
"alias": "Brand Alias",
"id": 92590,
"object": "brand",
"created_on": "2020-12-01T08:00:00.000Z"
},
"discount_level_id": 999,
"discount_level": {
"id": 12321,
"object": "discountlevel",
"client_identifier": "",
"name": "loyalty discount",
"description": "Discount for regular customers.",
"brand_discounts": [],
"accounts": [],
"created_on": "2020-12-01T08:00:00.000Z"
},
"percent_discount": 25,
"created_on": "2020-12-01T08:00:00.000Z"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Brand Discount was successfully created. | BrandDiscount |
400 | Bad Request | Brand Discount could not be created. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Retrieve a Brand Discount
Code samples
# You can also use wget
curl -X GET /api/v1/BrandDiscounts/{id} \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/BrandDiscounts/{id}";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/BrandDiscounts/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/BrandDiscounts/{id}', headers = headers)
print(r.json())
const headers = {
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/BrandDiscounts/{id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/BrandDiscounts/{id}',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/BrandDiscounts/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the Brand Discount being requested. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Example responses
200 Response
{"id":12321,"object":"branddiscount","client_identifier":"","brand_id":999,"brand":{"client_identifier":"","name":"Brand Name","alias":"Brand Alias","id":92590,"object":"brand","created_on":"2020-12-01T08:00:00.000Z"},"discount_level_id":999,"discount_level":{"id":12321,"object":"discountlevel","client_identifier":"","name":"loyalty discount","description":"Discount for regular customers.","brand_discounts":[],"accounts":[],"created_on":"2020-12-01T08:00:00.000Z"},"percent_discount":25,"created_on":"2020-12-01T08:00:00.000Z"}
{
"id": 12321,
"object": "branddiscount",
"client_identifier": "",
"brand_id": 999,
"brand": {
"client_identifier": "",
"name": "Brand Name",
"alias": "Brand Alias",
"id": 92590,
"object": "brand",
"created_on": "2020-12-01T08:00:00.000Z"
},
"discount_level_id": 999,
"discount_level": {
"id": 12321,
"object": "discountlevel",
"client_identifier": "",
"name": "loyalty discount",
"description": "Discount for regular customers.",
"brand_discounts": [],
"accounts": [],
"created_on": "2020-12-01T08:00:00.000Z"
},
"percent_discount": 25,
"created_on": "2020-12-01T08:00:00.000Z"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Brand Discount successfully retrieved. | BrandDiscount |
400 | Bad Request | Brand Discount could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Update a Brand Discount
Code samples
# You can also use wget
curl -X PUT /api/v1/BrandDiscounts/{id} \
-H 'Content-Type: application/json' \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePutRequest()
{
int id = 1;
string url = "/api/v1/BrandDiscounts/{id}";
string json = @"{
""brand_discount_id"": 997,
""client_identifier"": """",
""brand_id"": 999,
""discount_level_id"": 999,
""percent_discount"": 25
}";
BrandDiscountRequest content = JsonConvert.DeserializeObject(json);
var result = await PutAsync(id, content, url);
}
/// Performs a PUT Request
public async Task PutAsync(int id, BrandDiscountRequest content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute PUT request
HttpResponseMessage response = await Client.PutAsync(url + $"/{id}", jsonContent);
//Return response
return await DeserializeObject(response);
}
/// Serialize an object to Json
private StringContent SerializeObject(BrandDiscountRequest content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','/api/v1/BrandDiscounts/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.put('/api/v1/BrandDiscounts/{id}', headers = headers)
print(r.json())
const inputBody = '{
"brand_discount_id": 997,
"client_identifier": "",
"brand_id": 999,
"discount_level_id": 999,
"percent_discount": 25
}';
const headers = {
'Content-Type':'application/json',
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/BrandDiscounts/{id}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.put '/api/v1/BrandDiscounts/{id}',
params: {
}, headers: headers
p JSON.parse(result)
PUT /api/v1/BrandDiscounts/{id}
Body parameter
{
"brand_discount_id": 997,
"client_identifier": "",
"brand_id": 999,
"discount_level_id": 999,
"percent_discount": 25
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the Brand Discount that will be updated. |
body | body | BrandDiscountRequest | false | The Brand Discount to be updated. |
brand_discount_id | body | integer (int64) | false | The ID associated with the Brand Discount. |
client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
brand_id | body | integer (int64) | false | The ID of the Brand that the Brand Discount is attached to. |
discount_level_id | body | integer (int64) | false | The ID of the DiscountLevel that the Brand Discount is attached to. |
percent_discount | body | number (double) | false | The discount percentage. This must be a value from 0 to 100. |
Example responses
200 Response
{"id":12321,"object":"branddiscount","client_identifier":"","brand_id":999,"brand":{"client_identifier":"","name":"Brand Name","alias":"Brand Alias","id":92590,"object":"brand","created_on":"2020-12-01T08:00:00.000Z"},"discount_level_id":999,"discount_level":{"id":12321,"object":"discountlevel","client_identifier":"","name":"loyalty discount","description":"Discount for regular customers.","brand_discounts":[],"accounts":[],"created_on":"2020-12-01T08:00:00.000Z"},"percent_discount":25,"created_on":"2020-12-01T08:00:00.000Z"}
{
"id": 12321,
"object": "branddiscount",
"client_identifier": "",
"brand_id": 999,
"brand": {
"client_identifier": "",
"name": "Brand Name",
"alias": "Brand Alias",
"id": 92590,
"object": "brand",
"created_on": "2020-12-01T08:00:00.000Z"
},
"discount_level_id": 999,
"discount_level": {
"id": 12321,
"object": "discountlevel",
"client_identifier": "",
"name": "loyalty discount",
"description": "Discount for regular customers.",
"brand_discounts": [],
"accounts": [],
"created_on": "2020-12-01T08:00:00.000Z"
},
"percent_discount": 25,
"created_on": "2020-12-01T08:00:00.000Z"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Brand Discount was successfully updated. | BrandDiscount |
400 | Bad Request | Brand Discount could not be updated. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Delete an Brand Discount
Code samples
# You can also use wget
curl -X DELETE /api/v1/BrandDiscounts/{id} \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeDeleteRequest()
{
int id = 1;
string url = "/api/v1/BrandDiscounts/{id}";
await DeleteAsync(id, url);
}
/// Performs a DELETE Request
public async Task DeleteAsync(int id, string url)
{
//Execute DELETE request
HttpResponseMessage response = await Client.DeleteAsync(url + $"/{id}");
//Return response
await DeserializeObject(response);
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','/api/v1/BrandDiscounts/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.delete('/api/v1/BrandDiscounts/{id}', headers = headers)
print(r.json())
const headers = {
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/BrandDiscounts/{id}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.delete '/api/v1/BrandDiscounts/{id}',
params: {
}, headers: headers
p JSON.parse(result)
DELETE /api/v1/BrandDiscounts/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the Brand Discount to be deleted. |
Example responses
200 Response
{"id":12321,"object":"branddiscount","client_identifier":"","brand_id":999,"brand":{"client_identifier":"","name":"Brand Name","alias":"Brand Alias","id":92590,"object":"brand","created_on":"2020-12-01T08:00:00.000Z"},"discount_level_id":999,"discount_level":{"id":12321,"object":"discountlevel","client_identifier":"","name":"loyalty discount","description":"Discount for regular customers.","brand_discounts":[],"accounts":[],"created_on":"2020-12-01T08:00:00.000Z"},"percent_discount":25,"created_on":"2020-12-01T08:00:00.000Z"}
{
"id": 12321,
"object": "branddiscount",
"client_identifier": "",
"brand_id": 999,
"brand": {
"client_identifier": "",
"name": "Brand Name",
"alias": "Brand Alias",
"id": 92590,
"object": "brand",
"created_on": "2020-12-01T08:00:00.000Z"
},
"discount_level_id": 999,
"discount_level": {
"id": 12321,
"object": "discountlevel",
"client_identifier": "",
"name": "loyalty discount",
"description": "Discount for regular customers.",
"brand_discounts": [],
"accounts": [],
"created_on": "2020-12-01T08:00:00.000Z"
},
"percent_discount": 25,
"created_on": "2020-12-01T08:00:00.000Z"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Brand Discount was successfully deleted. | BrandDiscount |
400 | Bad Request | Brand Discount could not be deleted. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Brands
Retrieve a List of Brands
A maximum of 100 records can be requested at once. If more records are needed, a page can be supplied to get the next set of records. If no IDs are supplied, all available Brands (up to the maximum) will be returned.
Code samples
# You can also use wget
curl -X GET /api/v1/Brands \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/Brands";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/Brands', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/Brands', headers = headers)
print(r.json())
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Brands',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/Brands',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/Brands
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Ids | query | array[integer] | false | The IDs of the objects that are being requested. |
Page | query | integer(int32) | false | The page of the results. |
Limit | query | integer(int32) | false | A limit on the number of objects to be returned, between 1 and 100. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Example responses
200 Response
[
{
"client_identifier": "",
"name": "Brand Name",
"alias": "Brand Alias",
"id": 92590,
"object": "brand",
"created_on": "2020-12-01T08:00:00.000Z"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Brands successfully retrieved. | Inline |
400 | Bad Request | Brands could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Response Schema
Status Code 200
Name | Type | Required | Description |
---|---|---|---|
anonymous | [Brand] | false | [The Brand object contains information about brands.A brand is a term, name or design that is associated with a number of sellers, goods or products. A brand represents the identity or personality of a given set of products. Brands may manufacturer and sell their products through their own seller or through multiple sellers. A Brand will have a name, alias, and list of related Product .] |
» client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
» name | string ¦ null | false | The unique name of the brand. |
» alias | string ¦ null | false | Another name that can be used to reference the brand. |
» id | integer (int64) | false | The primary identifier of the Brand. |
» object | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
» created_on | string (date-time) | false | The UTC date the brand was created on. |
Retrieve a Brand
Code samples
# You can also use wget
curl -X GET /api/v1/Brands/{id} \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/Brands/{id}";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/Brands/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/Brands/{id}', headers = headers)
print(r.json())
const headers = {
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Brands/{id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/Brands/{id}',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/Brands/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the Brand being requested. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Example responses
200 Response
{"client_identifier":"","name":"Brand Name","alias":"Brand Alias","id":92590,"object":"brand","created_on":"2020-12-01T08:00:00.000Z"}
{
"client_identifier": "",
"name": "Brand Name",
"alias": "Brand Alias",
"id": 92590,
"object": "brand",
"created_on": "2020-12-01T08:00:00.000Z"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Brand successfully retrieved. | Brand |
400 | Bad Request | Brand could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Carriers
Retrieve a List of Carriers
A maximum of 100 records can be requested at once. If more records are needed, a page can be supplied to get the next set of records. If no IDs are supplied, all available Carriers (up to the maximum) will be returned.
Code samples
# You can also use wget
curl -X GET /api/v1/Carriers \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/Carriers";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/Carriers', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/Carriers', headers = headers)
print(r.json())
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Carriers',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/Carriers',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/Carriers
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Ids | query | array[integer] | false | The IDs of the objects that are being requested. |
Page | query | integer(int32) | false | The page of the results. |
Limit | query | integer(int32) | false | A limit on the number of objects to be returned, between 1 and 100. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Example responses
200 Response
[
{
"id": 8,
"object": "carrier",
"slug": "DHLExpress",
"name": "DHL Express"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Carriers successfully retrieved. | Inline |
400 | Bad Request | Carriers could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Response Schema
Status Code 200
Name | Type | Required | Description |
---|---|---|---|
anonymous | [Carrier] | false | [The Carrier object represents a common carrier (or public carrier) responsible for transporting an order Shipment .] |
» id | integer (int64) | false | The primary identifier of the Carrier. |
» object | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
» slug | string ¦ null | false | The shortened carrier name. |
» name | string ¦ null | false | The formatted string name of the carrier. |
Retrieve a Carrier
Code samples
# You can also use wget
curl -X GET /api/v1/Carriers/{id} \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/Carriers/{id}";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/Carriers/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/Carriers/{id}', headers = headers)
print(r.json())
const headers = {
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Carriers/{id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/Carriers/{id}',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/Carriers/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the Carrier being requested. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Example responses
200 Response
{"id":8,"object":"carrier","slug":"DHLExpress","name":"DHL Express"}
{
"id": 8,
"object": "carrier",
"slug": "DHLExpress",
"name": "DHL Express"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Carrier successfully retrieved. | Carrier |
400 | Bad Request | Carrier could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
DiscountLevels
Retrieve a List of Discount Levels
A maximum of 100 records can be requested at once. If more records are needed, a page can be supplied to get the next set of records. If no IDs are supplied, all available Discount Levels (up to the maximum) will be returned.
Code samples
# You can also use wget
curl -X GET /api/v1/DiscountLevels \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/DiscountLevels";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/DiscountLevels', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/DiscountLevels', headers = headers)
print(r.json())
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/DiscountLevels',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/DiscountLevels',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/DiscountLevels
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Ids | query | array[integer] | false | The IDs of the objects that are being requested. |
Page | query | integer(int32) | false | The page of the results. |
Limit | query | integer(int32) | false | A limit on the number of objects to be returned, between 1 and 100. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Example responses
200 Response
{
"object": "list",
"data": [
{}
],
"has_more": true,
"total_items": 0,
"url": "string",
"count": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Discount Levels successfully retrieved. | DiscountLevels |
400 | Bad Request | Discount Levels could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Create a New Discount Level
Code samples
# You can also use wget
curl -X POST /api/v1/DiscountLevels \
-H 'Content-Type: application/json' \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePostRequest()
{
string url = "/api/v1/DiscountLevels";
string json = @"{
""client_identifier"": """",
""name"": ""loyalty discount"",
""description"": ""Discount for regular customers."",
""brand_discounts"": [
{}
],
""accounts"": [
{}
]
}";
DiscountLevelRequest content = JsonConvert.DeserializeObject(json);
await PostAsync(content, url);
}
/// Performs a POST Request
public async Task PostAsync(DiscountLevelRequest content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute POST request
HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
}
/// Serialize an object to Json
private StringContent SerializeObject(DiscountLevelRequest content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api/v1/DiscountLevels', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/api/v1/DiscountLevels', headers = headers)
print(r.json())
const inputBody = '{
"client_identifier": "",
"name": "loyalty discount",
"description": "Discount for regular customers.",
"brand_discounts": [
{}
],
"accounts": [
{}
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/DiscountLevels',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/api/v1/DiscountLevels',
params: {
}, headers: headers
p JSON.parse(result)
POST /api/v1/DiscountLevels
Body parameter
{
"client_identifier": "",
"name": "loyalty discount",
"description": "Discount for regular customers.",
"brand_discounts": [
{}
],
"accounts": [
{}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | DiscountLevelRequest | false | The Discount Level to be created. |
client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
name | body | string ¦ null | false | The name of the discount level. |
description | body | string ¦ null | false | The description of the discount level. |
brand_discounts | body | [BrandDiscountRequest] ¦ null | false | A list of BrandDiscount associated with the discount level. |
» brand_discount_id | body | integer (int64) | false | The ID associated with the Brand Discount. |
» client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
» brand_id | body | integer (int64) | false | The ID of the Brand that the Brand Discount is attached to. |
» discount_level_id | body | integer (int64) | false | The ID of the DiscountLevel that the Brand Discount is attached to. |
» percent_discount | body | number (double) | false | The discount percentage. This must be a value from 0 to 100. |
accounts | body | [AccountRequest] ¦ null | false | A list of Account associated with the discount level. |
» client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
» discount_level_id | body | integer (int64) | false | The ID of the DiscountLevel that the account is attached to. |
» name | body | string ¦ null | false | The unique name of the account. |
» account_number | body | string ¦ null | false | The unique account number associated with the account. |
» payment_terms | body | string | false | Payment terms are limited to the following pre-defined values: |
» custom_payment_terms | body | string ¦ null | false | none |
» customer_type | body | string ¦ null | false | The customer type of the account. |
» industry | body | string ¦ null | false | The industry that the account is associated with. |
» city | body | string ¦ null | false | The city or town of the account. |
» state_code | body | string ¦ null | false | The two letter state or province code that corresponds to the state or province of the account. |
» country_code | body | string ¦ null | false | The two letter country code the corresponds to the country of the account. |
» postal_code | body | string ¦ null | false | The zip or postal code of the account. |
» street1 | body | string ¦ null | false | The primary mailing address of the account. |
» street2 | body | string ¦ null | false | An additional mailing address for the account. |
body | string ¦ null | false | The email address of the primary contact for the account. | |
» phone_number | body | string ¦ null | false | The phone number at the address of the account. |
» user_accounts | body | [AccountUserRequest] ¦ null | false | Include this list of AccountUser to create account users for the account. |
Detailed descriptions
brand_discounts: A list of BrandDiscount
associated with the discount level.
A BrandDiscount
is required for the discount level to have any effect.
Each BrandDiscount
contains the percentage discount and the Brand
that the discount applies to.
Include this list of BrandDiscount
to create or update Brand Discounts for the Discount Level.
accounts: A list of Account
associated with the discount level.
Include this list of Account
to create or update Accounts for the Discount Level.
» payment_terms: Payment terms are limited to the following pre-defined values: - Net7 - Net10 - Net15 - Net30 - Net60 - Net90 - CreditCard - CashOnDelivery - DueOnReceipt - EndOfMonth - PaymentInAdvance - Custom
Enumerated Values
Parameter | Value |
---|---|
» payment_terms | NET7 |
» payment_terms | NET10 |
» payment_terms | NET15 |
» payment_terms | NET30 |
» payment_terms | NET60 |
» payment_terms | NET90 |
» payment_terms | CreditCard |
» payment_terms | CashOnDelivery |
» payment_terms | DueOnReceipt |
» payment_terms | EndOfMonth |
» payment_terms | PaymentInAdvance |
» payment_terms | FifteenthOfMonth |
» payment_terms | NET45 |
» payment_terms | Custom |
» payment_terms | TwoTenNET30 |
» payment_terms | TwoTenNET45 |
» payment_terms | TwoTenNET60 |
» payment_terms | TwoTenNET90 |
Example responses
201 Response
{"id":12321,"object":"discountlevel","client_identifier":"","name":"loyalty discount","description":"Discount for regular customers.","brand_discounts":[{}],"accounts":[{}],"created_on":"2020-12-01T08:00:00.000Z"}
{
"id": 12321,
"object": "discountlevel",
"client_identifier": "",
"name": "loyalty discount",
"description": "Discount for regular customers.",
"brand_discounts": [
{}
],
"accounts": [
{}
],
"created_on": "2020-12-01T08:00:00.000Z"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Discount Level was successfully created. | None |
201 | Created | Created | DiscountLevel |
400 | Bad Request | Discount Level could not be created. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Retrieve a Discount Level by name
Code samples
# You can also use wget
curl -X GET /api/v1/DiscountLevels/GetByName/{name} \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/DiscountLevels/GetByName/{name}";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/DiscountLevels/GetByName/{name}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/DiscountLevels/GetByName/{name}', headers = headers)
print(r.json())
const headers = {
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/DiscountLevels/GetByName/{name}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/DiscountLevels/GetByName/{name}',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/DiscountLevels/GetByName/{name}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
name | path | string | true | The Name of the Discount Level being requested. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Example responses
200 Response
{"id":12321,"object":"discountlevel","client_identifier":"","name":"loyalty discount","description":"Discount for regular customers.","brand_discounts":[{}],"accounts":[{}],"created_on":"2020-12-01T08:00:00.000Z"}
{
"id": 12321,
"object": "discountlevel",
"client_identifier": "",
"name": "loyalty discount",
"description": "Discount for regular customers.",
"brand_discounts": [
{}
],
"accounts": [
{}
],
"created_on": "2020-12-01T08:00:00.000Z"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Discount Level successfully retrieved. | DiscountLevel |
400 | Bad Request | Discount Level could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Retrieve a Discount Level
Code samples
# You can also use wget
curl -X GET /api/v1/DiscountLevels/{id} \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/DiscountLevels/{id}";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/DiscountLevels/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/DiscountLevels/{id}', headers = headers)
print(r.json())
const headers = {
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/DiscountLevels/{id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/DiscountLevels/{id}',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/DiscountLevels/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the Discount Level being requested. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Example responses
200 Response
{"id":12321,"object":"discountlevel","client_identifier":"","name":"loyalty discount","description":"Discount for regular customers.","brand_discounts":[{}],"accounts":[{}],"created_on":"2020-12-01T08:00:00.000Z"}
{
"id": 12321,
"object": "discountlevel",
"client_identifier": "",
"name": "loyalty discount",
"description": "Discount for regular customers.",
"brand_discounts": [
{}
],
"accounts": [
{}
],
"created_on": "2020-12-01T08:00:00.000Z"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Discount Level successfully retrieved. | DiscountLevel |
400 | Bad Request | Discount Level could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Update a Discount Level
Code samples
# You can also use wget
curl -X PUT /api/v1/DiscountLevels/{id} \
-H 'Content-Type: application/json' \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePutRequest()
{
int id = 1;
string url = "/api/v1/DiscountLevels/{id}";
string json = @"{
""client_identifier"": """",
""name"": ""loyalty discount"",
""description"": ""Discount for regular customers."",
""brand_discounts"": [
{}
],
""accounts"": [
{}
]
}";
DiscountLevelRequest content = JsonConvert.DeserializeObject(json);
var result = await PutAsync(id, content, url);
}
/// Performs a PUT Request
public async Task PutAsync(int id, DiscountLevelRequest content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute PUT request
HttpResponseMessage response = await Client.PutAsync(url + $"/{id}", jsonContent);
//Return response
return await DeserializeObject(response);
}
/// Serialize an object to Json
private StringContent SerializeObject(DiscountLevelRequest content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','/api/v1/DiscountLevels/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.put('/api/v1/DiscountLevels/{id}', headers = headers)
print(r.json())
const inputBody = '{
"client_identifier": "",
"name": "loyalty discount",
"description": "Discount for regular customers.",
"brand_discounts": [
{}
],
"accounts": [
{}
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/DiscountLevels/{id}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.put '/api/v1/DiscountLevels/{id}',
params: {
}, headers: headers
p JSON.parse(result)
PUT /api/v1/DiscountLevels/{id}
Body parameter
{
"client_identifier": "",
"name": "loyalty discount",
"description": "Discount for regular customers.",
"brand_discounts": [
{}
],
"accounts": [
{}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the Discount Level that will be updated. |
body | body | DiscountLevelRequest | false | The Discount Level to be updated. |
client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
name | body | string ¦ null | false | The name of the discount level. |
description | body | string ¦ null | false | The description of the discount level. |
brand_discounts | body | [BrandDiscountRequest] ¦ null | false | A list of BrandDiscount associated with the discount level. |
» brand_discount_id | body | integer (int64) | false | The ID associated with the Brand Discount. |
» client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
» brand_id | body | integer (int64) | false | The ID of the Brand that the Brand Discount is attached to. |
» discount_level_id | body | integer (int64) | false | The ID of the DiscountLevel that the Brand Discount is attached to. |
» percent_discount | body | number (double) | false | The discount percentage. This must be a value from 0 to 100. |
accounts | body | [AccountRequest] ¦ null | false | A list of Account associated with the discount level. |
» client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
» discount_level_id | body | integer (int64) | false | The ID of the DiscountLevel that the account is attached to. |
» name | body | string ¦ null | false | The unique name of the account. |
» account_number | body | string ¦ null | false | The unique account number associated with the account. |
» payment_terms | body | string | false | Payment terms are limited to the following pre-defined values: |
» custom_payment_terms | body | string ¦ null | false | none |
» customer_type | body | string ¦ null | false | The customer type of the account. |
» industry | body | string ¦ null | false | The industry that the account is associated with. |
» city | body | string ¦ null | false | The city or town of the account. |
» state_code | body | string ¦ null | false | The two letter state or province code that corresponds to the state or province of the account. |
» country_code | body | string ¦ null | false | The two letter country code the corresponds to the country of the account. |
» postal_code | body | string ¦ null | false | The zip or postal code of the account. |
» street1 | body | string ¦ null | false | The primary mailing address of the account. |
» street2 | body | string ¦ null | false | An additional mailing address for the account. |
body | string ¦ null | false | The email address of the primary contact for the account. | |
» phone_number | body | string ¦ null | false | The phone number at the address of the account. |
» user_accounts | body | [AccountUserRequest] ¦ null | false | Include this list of AccountUser to create account users for the account. |
Detailed descriptions
brand_discounts: A list of BrandDiscount
associated with the discount level.
A BrandDiscount
is required for the discount level to have any effect.
Each BrandDiscount
contains the percentage discount and the Brand
that the discount applies to.
Include this list of BrandDiscount
to create or update Brand Discounts for the Discount Level.
accounts: A list of Account
associated with the discount level.
Include this list of Account
to create or update Accounts for the Discount Level.
» payment_terms: Payment terms are limited to the following pre-defined values: - Net7 - Net10 - Net15 - Net30 - Net60 - Net90 - CreditCard - CashOnDelivery - DueOnReceipt - EndOfMonth - PaymentInAdvance - Custom
Enumerated Values
Parameter | Value |
---|---|
» payment_terms | NET7 |
» payment_terms | NET10 |
» payment_terms | NET15 |
» payment_terms | NET30 |
» payment_terms | NET60 |
» payment_terms | NET90 |
» payment_terms | CreditCard |
» payment_terms | CashOnDelivery |
» payment_terms | DueOnReceipt |
» payment_terms | EndOfMonth |
» payment_terms | PaymentInAdvance |
» payment_terms | FifteenthOfMonth |
» payment_terms | NET45 |
» payment_terms | Custom |
» payment_terms | TwoTenNET30 |
» payment_terms | TwoTenNET45 |
» payment_terms | TwoTenNET60 |
» payment_terms | TwoTenNET90 |
Example responses
200 Response
{"id":12321,"object":"discountlevel","client_identifier":"","name":"loyalty discount","description":"Discount for regular customers.","brand_discounts":[{}],"accounts":[{}],"created_on":"2020-12-01T08:00:00.000Z"}
{
"id": 12321,
"object": "discountlevel",
"client_identifier": "",
"name": "loyalty discount",
"description": "Discount for regular customers.",
"brand_discounts": [
{}
],
"accounts": [
{}
],
"created_on": "2020-12-01T08:00:00.000Z"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Discount Level was successfully updated. | DiscountLevel |
400 | Bad Request | Discount Level could not be updated. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Delete a Discount Level
Code samples
# You can also use wget
curl -X DELETE /api/v1/DiscountLevels/{id} \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeDeleteRequest()
{
int id = 1;
string url = "/api/v1/DiscountLevels/{id}";
await DeleteAsync(id, url);
}
/// Performs a DELETE Request
public async Task DeleteAsync(int id, string url)
{
//Execute DELETE request
HttpResponseMessage response = await Client.DeleteAsync(url + $"/{id}");
//Return response
await DeserializeObject(response);
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','/api/v1/DiscountLevels/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.delete('/api/v1/DiscountLevels/{id}', headers = headers)
print(r.json())
const headers = {
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/DiscountLevels/{id}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.delete '/api/v1/DiscountLevels/{id}',
params: {
}, headers: headers
p JSON.parse(result)
DELETE /api/v1/DiscountLevels/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int32) | true | The ID of the Discount Level to be deleted. |
Example responses
200 Response
{"id":12321,"object":"discountlevel","client_identifier":"","name":"loyalty discount","description":"Discount for regular customers.","brand_discounts":[{}],"accounts":[{}],"created_on":"2020-12-01T08:00:00.000Z"}
{
"id": 12321,
"object": "discountlevel",
"client_identifier": "",
"name": "loyalty discount",
"description": "Discount for regular customers.",
"brand_discounts": [
{}
],
"accounts": [
{}
],
"created_on": "2020-12-01T08:00:00.000Z"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Discount Level was successfully deleted. | DiscountLevel |
400 | Bad Request | Discount Level could not be deleted. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Orders
Retrieve a List of Orders
A maximum of 100 records can be requested at once. If more records are needed, a page can be supplied to get the next set of records. If no IDs are supplied, all available Orders (up to the maximum) will be returned.
Code samples
# You can also use wget
curl -X GET /api/v1/Orders \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/Orders";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/Orders', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/Orders', headers = headers)
print(r.json())
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Orders',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/Orders',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/Orders
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Statuses | query | array[string] | false | Return only Orders with corresponding statuses. |
CreatedOnMin | query | string(date-time) | false | The minimum created on date for the list of Orders. Must be less than or equal to CreatedOnMax . |
CreatedOnMax | query | string(date-time) | false | The maximum created on date for the list of Orders. Must be greater than or equal to CreatedOnMin . |
SinceId | query | integer(int64) | false | The Order with this ID as well as Orders created before it will be excluded from the response. |
Ids | query | array[integer] | false | The IDs of the objects that are being requested. |
Page | query | integer(int32) | false | The page of the results. |
Limit | query | integer(int32) | false | A limit on the number of objects to be returned, between 1 and 100. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Enumerated Values
Parameter | Value |
---|---|
Statuses | New |
Statuses | Processing |
Statuses | Shipped |
Statuses | PartiallyShipped |
Statuses | Complete |
Statuses | Cancelled |
Statuses | Received |
Statuses | RefundRequested |
Statuses | Refunded |
Statuses | RefundRejected |
Statuses | StockConfirmed |
Statuses | StockPartiallyConfirmed |
Statuses | ReadyForPickup |
Statuses | PartiallyReadyForPickup |
Example responses
200 Response
[
{
"id": 8,
"object": "order",
"client_identifier": "string",
"shopping_cart_id": 43,
"order_number": "ORD-000009158381-123",
"customer_id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"customer": {},
"items": [],
"shipping_address": {},
"billing_address": {},
"shipments": [],
"shipping_instructions": "",
"shipping_method": "Standard Shipping",
"currency_code": "CAD",
"seller_currency_code": "USD",
"order_status": "Processing",
"payment_method": "CreditCard",
"subtotal": 484.99,
"freight": 15.99,
"tax": 24.25,
"discount": 15,
"tax_rate": 0.05,
"transaction_fee": 31.23,
"total": 525.23,
"exchange_rate": 0.75,
"seller_subtotal": 363.74,
"seller_freight": 11.99,
"seller_tax": 18.19,
"seller_discount": 10,
"seller_transaction_fee": 31.23,
"seller_total": 393.917,
"ordered_date": "2020-12-01T08:00:00.000Z",
"additional_information": {},
"url": "https://domain.com/order/x1D"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Orders successfully retrieved. | Inline |
400 | Bad Request | Orders could not be retrieved. More details about the problem | |
can be found in the errors list in the response. | ValidationProblemDetails | ||
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Response Schema
Status Code 200
Name | Type | Required | Description |
---|---|---|---|
anonymous | [Order] | false | [The Order object contains information about the sales order. An order is a customer's completed request to purchase one or more products from a shop. An order is created when a customer completes the checkout process, during which time they provide an email address or phone number, billing address and payment information.] |
» id | integer (int64) | false | The primary identifier of the Order |
» object | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
» client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
» shopping_cart_id | integer (int64) ¦ null | false | A unique identifier for the shopping cart |
» order_number | string ¦ null | false | A unique identifier for the order |
» customer_id | string ¦ null | false | The primary identifier for the customer |
» customer | Customer | false | none |
» items | [OrderItem] ¦ null | false | A list of line item objects, each containing information about an item in the order. |
» shipping_address | ShippingAddress | false | The mailing address to where the order will be shipped. |
» billing_address | BillingAddress | false | The mailing address associated with the payment method. |
» shipments | [Shipment] ¦ null | false | List of shipments for the order |
» shipping_instructions | string ¦ null | false | Special instructions to be used when sending out shipments |
» shipping_method | string ¦ null | false | How the order is to be shipped |
» currency_code | string ¦ null | false | The three letter code (ISO 4217) for the currency used for the payment. |
» seller_currency_code | string ¦ null | false | The three letter code (ISO 4217) for the store's currency. |
» order_status | string | false | Order statuses are limited to the following pre-defined values: - New - Order has been placed by the customer, but has not yet been confirmed. - Processing - Order has been confirmed by the seller, but has not shipped. - Shipped - Order has been fully shipped, but has not been delivered. - PartiallyShipped - Some but not all items of an order have been shipped. - Complete - Order has been delivered. - Cancelled - Order has been cancelled by the seller or customer . - RefundRequested - Customer has requested a refund for the order. - Refunded - Seller has refunded the order. - RefundRejected - Seller has rejected the refund request. |
» payment_method | string | false | Payment methods are limited to the following pre-defined values: - CreditCard - Customer used a credit card, and funds are collected when the order is confirmed - Account - Customer is attached to an account, and the seller is responsible for collecting payment |
» subtotal | number (double) | false | The subtotal for all the line items of the order in the Customer's currency |
» freight | number (double) | false | The total freight of the order in the Customer's currency |
» tax | number (double) | false | The total tax for the order in the Customer's currency |
» discount | number (double) | false | The total discount for the order in the Customer's currency |
» tax_rate | number (double) | false | The tax rate of the order |
» transaction_fee | number (double) | false | The total amount of the transaction fee in the Customer's currency |
» total | number (double) | false | The total amount of the order in the Customer's currency |
» exchange_rate | number (double) | false | The exchange rate used when the order was placed. |
» seller_subtotal | number (double) | false | The subtotal for all the line items of the order in the Seller's currency |
» seller_freight | number (double) | false | The total freight of the order in the Seller's currency |
» seller_tax | number (double) | false | The total tax for the order in the Seller's currency |
» seller_discount | number (double) | false | The total discount for the order in the Seller's currency |
» seller_transaction_fee | number (double) | false | The total amount of the transaction fee in the Seller's currency |
» seller_total | number (double) | false | The total amount of the order in the Seller's currency |
» ordered_date | string (date-time) | false | The UTC date the order was created on. |
» additional_information | OrderAdditionalInformation | false | none |
» url | string (uri) ¦ null | false | The Url to the order for the customer |
Enumerated Values
Property | Value |
---|---|
order_status | New |
order_status | Processing |
order_status | Shipped |
order_status | PartiallyShipped |
order_status | Complete |
order_status | Cancelled |
order_status | Received |
order_status | RefundRequested |
order_status | Refunded |
order_status | RefundRejected |
order_status | StockConfirmed |
order_status | StockPartiallyConfirmed |
order_status | ReadyForPickup |
order_status | PartiallyReadyForPickup |
payment_method | CreditCard |
payment_method | Account |
payment_method | Free |
Create a New Order
Code samples
# You can also use wget
curl -X POST /api/v1/Orders \
-H 'Content-Type: application/json' \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePostRequest()
{
string url = "/api/v1/Orders";
string json = @"{
""client_identifier"": ""string"",
""order_number"": ""ORD-000009158381-123"",
""customer_id"": ""e49fe4dd-b087-439f-8897-bcfc84b5dacc"",
""account_id"": 0,
""items"": [
{}
],
""shipping_address"": {
""client_identifier"": ""string"",
""id"": 8,
""object"": ""address"",
""created_on"": ""2020-12-01T08:00:00.000Z"",
""name"": ""Main Office"",
""first_name"": ""string"",
""last_name"": ""string"",
""company_name"": ""string"",
""city"": ""Main Office"",
""state_code"": ""TX"",
""country_code"": ""US"",
""street1"": ""915 W Dallas St"",
""street2"": ""Unit 112"",
""postal_code"": ""77019"",
""phone_number"": ""+1 713-123-1234"",
""is_primary"": true,
""is_warehouse"": true
},
""billing_address"": {
""client_identifier"": ""string"",
""id"": 8,
""object"": ""address"",
""created_on"": ""2020-12-01T08:00:00.000Z"",
""name"": ""Main Office"",
""first_name"": ""string"",
""last_name"": ""string"",
""company_name"": ""string"",
""city"": ""Main Office"",
""state_code"": ""TX"",
""country_code"": ""US"",
""street1"": ""915 W Dallas St"",
""street2"": ""Unit 112"",
""postal_code"": ""77019"",
""phone_number"": ""+1 713-123-1234"",
""is_primary"": true,
""is_warehouse"": true
},
""shipments"": [
{}
],
""shipping_instructions"": """",
""shipping_method"": ""Standard Shipping"",
""currency_code"": ""CAD"",
""seller_currency_code"": ""USD"",
""order_status"": ""Processing"",
""subtotal"": 484.99,
""freight"": 15.99,
""tax"": 24.25,
""discount"": 15,
""tax_rate"": 0.05,
""total"": 525.23,
""ordered_date"": ""2020-12-01T08:00:00.000Z"",
""additional_information"": {
""tax_id"": ""xx-xxxxxxx"",
""purchase_order_number"": ""PO-89838"",
""fields"": [],
""comments"": """"
}
}";
OrderRequest content = JsonConvert.DeserializeObject(json);
await PostAsync(content, url);
}
/// Performs a POST Request
public async Task PostAsync(OrderRequest content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute POST request
HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
}
/// Serialize an object to Json
private StringContent SerializeObject(OrderRequest content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api/v1/Orders', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/api/v1/Orders', headers = headers)
print(r.json())
const inputBody = '{
"client_identifier": "string",
"order_number": "ORD-000009158381-123",
"customer_id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"account_id": 0,
"items": [
{}
],
"shipping_address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"billing_address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"shipments": [
{}
],
"shipping_instructions": "",
"shipping_method": "Standard Shipping",
"currency_code": "CAD",
"seller_currency_code": "USD",
"order_status": "Processing",
"subtotal": 484.99,
"freight": 15.99,
"tax": 24.25,
"discount": 15,
"tax_rate": 0.05,
"total": 525.23,
"ordered_date": "2020-12-01T08:00:00.000Z",
"additional_information": {
"tax_id": "xx-xxxxxxx",
"purchase_order_number": "PO-89838",
"fields": [],
"comments": ""
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Orders',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/api/v1/Orders',
params: {
}, headers: headers
p JSON.parse(result)
POST /api/v1/Orders
Body parameter
{
"client_identifier": "string",
"order_number": "ORD-000009158381-123",
"customer_id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"account_id": 0,
"items": [
{}
],
"shipping_address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"billing_address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"shipments": [
{}
],
"shipping_instructions": "",
"shipping_method": "Standard Shipping",
"currency_code": "CAD",
"seller_currency_code": "USD",
"order_status": "Processing",
"subtotal": 484.99,
"freight": 15.99,
"tax": 24.25,
"discount": 15,
"tax_rate": 0.05,
"total": 525.23,
"ordered_date": "2020-12-01T08:00:00.000Z",
"additional_information": {
"tax_id": "xx-xxxxxxx",
"purchase_order_number": "PO-89838",
"fields": [],
"comments": ""
}
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | OrderRequest | false | The Order to be created. |
client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
order_number | body | string ¦ null | false | A unique identifier for the order |
customer_id | body | string ¦ null | false | The primary identifier for the customer |
account_id | body | integer (int64) ¦ null | false | The account associated with the customer. |
items | body | [OrderItem] ¦ null | false | A list of line item objects, each containing information about an item in the order. |
» id | body | integer (int64) | false | Primary identifier for the line item |
» object | body | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
» client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
» sku_id | body | integer (int64) ¦ null | false | The ID of the SKU that the Order Item is attached to. |
» sku | body | Sku | false | The SKU object contains information about inventory and pricing for a Store. |
» order_id | body | integer (int64) | false | The ID of the Order that the Order Item is attached to. |
» product_id | body | integer (int64) | false | The ID of the Product that the Order Item is attached to. |
» product | body | Product | false | The Product object contains information about products. |
» quantity | body | integer (int32) | false | The number of items that were purchased. |
» model_number | body | string ¦ null | false | The item's MPN (Manufacturer's Part Number). |
» price_per_unit | body | number (double) | false | Customer's Price of each item |
» seller_price_per_unit | body | number (double) | false | Sellers's Price of each item |
» add_ons | body | [OrderItemAddOn] ¦ null | false | A list of add-ons that are attached to the order items |
» unit_of_measure | body | string ¦ null | false | Item Unit of Measure |
shipping_address | body | ShippingAddress | false | The mailing address to where the order will be shipped. |
» client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
» id | body | integer (int64) | false | The primary identifier of the Address. |
» object | body | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
» created_on | body | string (date-time) | false | When the address was created. |
» name | body | string ¦ null | false | Gets or sets the name of the address. |
» first_name | body | string ¦ null | false | The first name of the address contact. |
» last_name | body | string ¦ null | false | The last name of the address contact. |
» company_name | body | string ¦ null | false | The company name of the address contact. |
» city | body | string ¦ null | false | Gets or sets the city. |
» state_code | body | string ¦ null | false | The two-letter abbreviation of the state or province. |
» country_code | body | string ¦ null | false | The two-letter code (ISO 3166-1 alpha-2 two-letter country code) for the country. |
» street1 | body | string ¦ null | false | The primary street address. |
» street2 | body | string ¦ null | false | Optional field for additional information for the street address. |
» postal_code | body | string ¦ null | false | The zip or postal code |
» phone_number | body | string ¦ null | false | The phone number |
» is_primary | body | boolean | false | Is this your main address. Not updateable |
» is_warehouse | body | boolean | false | Is this address only a warehouse? Will not show up on contact pages when true. |
billing_address | body | BillingAddress | false | The mailing address associated with the payment method. |
» client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
» id | body | integer (int64) | false | The primary identifier of the Address. |
» object | body | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
» created_on | body | string (date-time) | false | When the address was created. |
» name | body | string ¦ null | false | Gets or sets the name of the address. |
» first_name | body | string ¦ null | false | The first name of the address contact. |
» last_name | body | string ¦ null | false | The last name of the address contact. |
» company_name | body | string ¦ null | false | The company name of the address contact. |
» city | body | string ¦ null | false | Gets or sets the city. |
» state_code | body | string ¦ null | false | The two-letter abbreviation of the state or province. |
» country_code | body | string ¦ null | false | The two-letter code (ISO 3166-1 alpha-2 two-letter country code) for the country. |
» street1 | body | string ¦ null | false | The primary street address. |
» street2 | body | string ¦ null | false | Optional field for additional information for the street address. |
» postal_code | body | string ¦ null | false | The zip or postal code |
» phone_number | body | string ¦ null | false | The phone number |
» is_primary | body | boolean | false | Is this your main address. Not updateable |
» is_warehouse | body | boolean | false | Is this address only a warehouse? Will not show up on contact pages when true. |
shipments | body | [Shipment] ¦ null | false | List of shipments for the order |
» id | body | integer (int64) | false | The primary identifier of the Shipment |
» object | body | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
» client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
» order_id | body | integer (int64) | false | The ID of the Order that the Shipment is attached to. |
» shipped_date | body | string (date-time) ¦ null | false | The UTC date the Shipment was shipped. |
» estimated_delivery_date | body | string (date-time) ¦ null | false | The UTC date of when Shipment is expected to be delivered. |
» tracking_number | body | string ¦ null | false | The tracking number of the shipment. |
» tracking_url | body | string ¦ null | false | External url where the customer can go to track their shipment. |
» carrier | body | string ¦ null | false | Name of the carrier/courier. If shipment type is Tracked. It must match one of the values in /api/v1/Shipments/Carriers |
» items | body | [ShipmentItem] ¦ null | false | List of items attached to the shipment. |
» add_ons | body | [ShipmentAddOn] ¦ null | false | List of addons attached to the shipment. |
» shipment_type | body | string | false | Gets the shipment type. |
» created_on | body | string (date-time) | false | The UTC date the Shipment was created on. |
» trackings | body | [ShipmentTracking] ¦ null | false | Tracking history of the shipment/ |
» address | body | Address | false | The Address object contains information about a place, or location. |
» status | body | string | false | Gets the shipment status. |
shipping_instructions | body | string ¦ null | false | Special instructions to be used when sending out shipments |
shipping_method | body | string ¦ null | false | How the order is to be shipped |
currency_code | body | string ¦ null | false | The three letter code (ISO 4217) for the currency used for the payment. |
seller_currency_code | body | string ¦ null | false | The three letter code (ISO 4217) for the store's currency. |
order_status | body | string | false | Order statuses are limited to the following pre-defined values: |
subtotal | body | number (double) | false | The subtotal for all the line items of the order in the Customer's currency |
freight | body | number (double) | false | The total freight of the order in the Customer's currency |
tax | body | number (double) | false | The total tax for the order in the Customer's currency |
discount | body | number (double) | false | The total discount for the order in the Customer's currency |
tax_rate | body | number (double) | false | The tax rate of the order |
total | body | number (double) | false | The total amount of the order in the Customer's currency |
ordered_date | body | string (date-time) | false | The UTC date the order was created on. |
additional_information | body | OrderAdditionalInformation | false | none |
» tax_id | body | string ¦ null | false | Customer's Tax Id / ITIN / EIN |
» purchase_order_number | body | string ¦ null | false | Customer's Purchase Order Number |
» fields | body | [OrderAdditionalInformationField] ¦ null | false | Custom fields to display on the order |
» comments | body | string ¦ null | false | The text of optional comments that a customer can attach to the order. |
Detailed descriptions
» sku: The SKU object contains information about inventory and pricing for a Store. An SKU will have a internal name identifier, manufacturer part number, inventory, pricing, and other information related fields for the SKU.
» product: The Product
object contains information about products.
An Product
will have a name, short name, short description, brand, and sku information.
» items: List of items attached to the shipment.
When creating a shipment, leave items empty to attach all remaining items to the shipment automatically.
» add_ons: List of addons attached to the shipment.
When creating a shipment, leave items empty to attach all remaining addons to the shipment automatically.
» shipment_type: Gets the shipment type. - Tracked - If carrier name matches list, all information will be updated from the carrier. - Custom - All information must be supplied and updated by the seller.
» address: The Address object contains information about a place, or location. Examples are - Offices - Warehouses - Shipping Addresses - Billing Addresses
» status: Gets the shipment status. - New - Shipment has not been supplied a Shipped Date yet. - Pending - Shipment has not been submitted to the carrier yet. - InfoReceived - Carrier has received information, but not picked up the shipment yet. - InTransit - Carrier has picked up the shipment, and is on route. - OutForDelivery - Shipment has left the carrier depot, and is out for delivery. - AttemptFail - Carrier could not delivery shipment to customer. - Delivered - Carrier successfully delivered shipment to customer. - AvailableForPickup - Customer must pick up shipment from carrier. - Exception - Something went wrong. - Expired - Took too long for carrier to receive the package. - ReturnToSender - Shipment is being returned to the sender.
order_status: Order statuses are limited to the following pre-defined values:
- New - Order has been placed by the customer, but has not yet been confirmed.
- Processing - Order has been confirmed by the seller, but has not shipped.
- Shipped - Order has been fully shipped, but has not been delivered.
- PartiallyShipped - Some but not all items of an order have been shipped.
- Complete - Order has been delivered.
- Cancelled - Order has been cancelled by the seller or customer .
- RefundRequested - Customer has requested a refund for the order.
- Refunded - Seller has refunded the order.
- RefundRejected - Seller has rejected the refund request.
Enumerated Values
Parameter | Value |
---|---|
» shipment_type | Tracked |
» shipment_type | Custom |
» shipment_type | Pickup |
» status | New |
» status | Pending |
» status | InfoReceived |
» status | InTransit |
» status | OutForDelivery |
» status | AttemptFail |
» status | Delivered |
» status | AvailableForPickup |
» status | Exception |
» status | Expired |
» status | ReturnToSender |
» status | PickedUp |
» status | Unknown |
order_status | New |
order_status | Processing |
order_status | Shipped |
order_status | PartiallyShipped |
order_status | Complete |
order_status | Cancelled |
order_status | Received |
order_status | RefundRequested |
order_status | Refunded |
order_status | RefundRejected |
order_status | StockConfirmed |
order_status | StockPartiallyConfirmed |
order_status | ReadyForPickup |
order_status | PartiallyReadyForPickup |
Example responses
200 Response
{"id":8,"object":"order","client_identifier":"string","shopping_cart_id":43,"order_number":"ORD-000009158381-123","customer_id":"e49fe4dd-b087-439f-8897-bcfc84b5dacc","customer":{"id":"e49fe4dd-b087-439f-8897-bcfc84b5dacc","object":"customer","first_name":"John","last_name":"Smit","company_name":"Widgets Inc","email_address":"john@widgetsinc.com","phone_number":"555-123-1234","account_id":12,"account_name":"Widgets Inc","account_number":"123456","discount_level_id":14,"discount_level_name":"PRICELEVEL-1"},"items":[{}],"shipping_address":{"client_identifier":"string","id":8,"object":"address","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","first_name":"string","last_name":"string","company_name":"string","city":"Main Office","state_code":"TX","country_code":"US","street1":"915 W Dallas St","street2":"Unit 112","postal_code":"77019","phone_number":"+1 713-123-1234","is_primary":true,"is_warehouse":true},"billing_address":{"client_identifier":"string","id":8,"object":"address","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","first_name":"string","last_name":"string","company_name":"string","city":"Main Office","state_code":"TX","country_code":"US","street1":"915 W Dallas St","street2":"Unit 112","postal_code":"77019","phone_number":"+1 713-123-1234","is_primary":true,"is_warehouse":true},"shipments":[{}],"shipping_instructions":"","shipping_method":"Standard Shipping","currency_code":"CAD","seller_currency_code":"USD","order_status":"Processing","payment_method":"CreditCard","subtotal":484.99,"freight":15.99,"tax":24.25,"discount":15,"tax_rate":0.05,"transaction_fee":31.23,"total":525.23,"exchange_rate":0.75,"seller_subtotal":363.74,"seller_freight":11.99,"seller_tax":18.19,"seller_discount":10,"seller_transaction_fee":31.23,"seller_total":393.917,"ordered_date":"2020-12-01T08:00:00.000Z","additional_information":{"tax_id":"xx-xxxxxxx","purchase_order_number":"PO-89838","fields":[],"comments":""},"url":"https://domain.com/order/x1D"}
{
"id": 8,
"object": "order",
"client_identifier": "string",
"shopping_cart_id": 43,
"order_number": "ORD-000009158381-123",
"customer_id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"customer": {
"id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"object": "customer",
"first_name": "John",
"last_name": "Smit",
"company_name": "Widgets Inc",
"email_address": "john@widgetsinc.com",
"phone_number": "555-123-1234",
"account_id": 12,
"account_name": "Widgets Inc",
"account_number": "123456",
"discount_level_id": 14,
"discount_level_name": "PRICELEVEL-1"
},
"items": [
{}
],
"shipping_address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"billing_address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"shipments": [
{}
],
"shipping_instructions": "",
"shipping_method": "Standard Shipping",
"currency_code": "CAD",
"seller_currency_code": "USD",
"order_status": "Processing",
"payment_method": "CreditCard",
"subtotal": 484.99,
"freight": 15.99,
"tax": 24.25,
"discount": 15,
"tax_rate": 0.05,
"transaction_fee": 31.23,
"total": 525.23,
"exchange_rate": 0.75,
"seller_subtotal": 363.74,
"seller_freight": 11.99,
"seller_tax": 18.19,
"seller_discount": 10,
"seller_transaction_fee": 31.23,
"seller_total": 393.917,
"ordered_date": "2020-12-01T08:00:00.000Z",
"additional_information": {
"tax_id": "xx-xxxxxxx",
"purchase_order_number": "PO-89838",
"fields": [],
"comments": ""
},
"url": "https://domain.com/order/x1D"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Order was successfully created. | Order |
400 | Bad Request | Order could not be created. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Retrieve an Order
Code samples
# You can also use wget
curl -X GET /api/v1/Orders/{id} \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/Orders/{id}";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/Orders/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/Orders/{id}', headers = headers)
print(r.json())
const headers = {
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Orders/{id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/Orders/{id}',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/Orders/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the Order being requested. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Example responses
200 Response
{"id":8,"object":"order","client_identifier":"string","shopping_cart_id":43,"order_number":"ORD-000009158381-123","customer_id":"e49fe4dd-b087-439f-8897-bcfc84b5dacc","customer":{"id":"e49fe4dd-b087-439f-8897-bcfc84b5dacc","object":"customer","first_name":"John","last_name":"Smit","company_name":"Widgets Inc","email_address":"john@widgetsinc.com","phone_number":"555-123-1234","account_id":12,"account_name":"Widgets Inc","account_number":"123456","discount_level_id":14,"discount_level_name":"PRICELEVEL-1"},"items":[{}],"shipping_address":{"client_identifier":"string","id":8,"object":"address","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","first_name":"string","last_name":"string","company_name":"string","city":"Main Office","state_code":"TX","country_code":"US","street1":"915 W Dallas St","street2":"Unit 112","postal_code":"77019","phone_number":"+1 713-123-1234","is_primary":true,"is_warehouse":true},"billing_address":{"client_identifier":"string","id":8,"object":"address","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","first_name":"string","last_name":"string","company_name":"string","city":"Main Office","state_code":"TX","country_code":"US","street1":"915 W Dallas St","street2":"Unit 112","postal_code":"77019","phone_number":"+1 713-123-1234","is_primary":true,"is_warehouse":true},"shipments":[{}],"shipping_instructions":"","shipping_method":"Standard Shipping","currency_code":"CAD","seller_currency_code":"USD","order_status":"Processing","payment_method":"CreditCard","subtotal":484.99,"freight":15.99,"tax":24.25,"discount":15,"tax_rate":0.05,"transaction_fee":31.23,"total":525.23,"exchange_rate":0.75,"seller_subtotal":363.74,"seller_freight":11.99,"seller_tax":18.19,"seller_discount":10,"seller_transaction_fee":31.23,"seller_total":393.917,"ordered_date":"2020-12-01T08:00:00.000Z","additional_information":{"tax_id":"xx-xxxxxxx","purchase_order_number":"PO-89838","fields":[],"comments":""},"url":"https://domain.com/order/x1D"}
{
"id": 8,
"object": "order",
"client_identifier": "string",
"shopping_cart_id": 43,
"order_number": "ORD-000009158381-123",
"customer_id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"customer": {
"id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"object": "customer",
"first_name": "John",
"last_name": "Smit",
"company_name": "Widgets Inc",
"email_address": "john@widgetsinc.com",
"phone_number": "555-123-1234",
"account_id": 12,
"account_name": "Widgets Inc",
"account_number": "123456",
"discount_level_id": 14,
"discount_level_name": "PRICELEVEL-1"
},
"items": [
{}
],
"shipping_address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"billing_address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"shipments": [
{}
],
"shipping_instructions": "",
"shipping_method": "Standard Shipping",
"currency_code": "CAD",
"seller_currency_code": "USD",
"order_status": "Processing",
"payment_method": "CreditCard",
"subtotal": 484.99,
"freight": 15.99,
"tax": 24.25,
"discount": 15,
"tax_rate": 0.05,
"transaction_fee": 31.23,
"total": 525.23,
"exchange_rate": 0.75,
"seller_subtotal": 363.74,
"seller_freight": 11.99,
"seller_tax": 18.19,
"seller_discount": 10,
"seller_transaction_fee": 31.23,
"seller_total": 393.917,
"ordered_date": "2020-12-01T08:00:00.000Z",
"additional_information": {
"tax_id": "xx-xxxxxxx",
"purchase_order_number": "PO-89838",
"fields": [],
"comments": ""
},
"url": "https://domain.com/order/x1D"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Order successfully retrieved. | Order |
400 | Bad Request | Order could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Update a Order
Code samples
# You can also use wget
curl -X PUT /api/v1/Orders/{id} \
-H 'Content-Type: application/json' \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePutRequest()
{
int id = 1;
string url = "/api/v1/Orders/{id}";
string json = @"{
""client_identifier"": ""string"",
""order_number"": ""ORD-000009158381-123"",
""customer_id"": ""e49fe4dd-b087-439f-8897-bcfc84b5dacc"",
""account_id"": 0,
""items"": [
{}
],
""shipping_address"": {
""client_identifier"": ""string"",
""id"": 8,
""object"": ""address"",
""created_on"": ""2020-12-01T08:00:00.000Z"",
""name"": ""Main Office"",
""first_name"": ""string"",
""last_name"": ""string"",
""company_name"": ""string"",
""city"": ""Main Office"",
""state_code"": ""TX"",
""country_code"": ""US"",
""street1"": ""915 W Dallas St"",
""street2"": ""Unit 112"",
""postal_code"": ""77019"",
""phone_number"": ""+1 713-123-1234"",
""is_primary"": true,
""is_warehouse"": true
},
""billing_address"": {
""client_identifier"": ""string"",
""id"": 8,
""object"": ""address"",
""created_on"": ""2020-12-01T08:00:00.000Z"",
""name"": ""Main Office"",
""first_name"": ""string"",
""last_name"": ""string"",
""company_name"": ""string"",
""city"": ""Main Office"",
""state_code"": ""TX"",
""country_code"": ""US"",
""street1"": ""915 W Dallas St"",
""street2"": ""Unit 112"",
""postal_code"": ""77019"",
""phone_number"": ""+1 713-123-1234"",
""is_primary"": true,
""is_warehouse"": true
},
""shipments"": [
{}
],
""shipping_instructions"": """",
""shipping_method"": ""Standard Shipping"",
""currency_code"": ""CAD"",
""seller_currency_code"": ""USD"",
""order_status"": ""Processing"",
""subtotal"": 484.99,
""freight"": 15.99,
""tax"": 24.25,
""discount"": 15,
""tax_rate"": 0.05,
""total"": 525.23,
""ordered_date"": ""2020-12-01T08:00:00.000Z"",
""additional_information"": {
""tax_id"": ""xx-xxxxxxx"",
""purchase_order_number"": ""PO-89838"",
""fields"": [],
""comments"": """"
}
}";
OrderRequest content = JsonConvert.DeserializeObject(json);
var result = await PutAsync(id, content, url);
}
/// Performs a PUT Request
public async Task PutAsync(int id, OrderRequest content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute PUT request
HttpResponseMessage response = await Client.PutAsync(url + $"/{id}", jsonContent);
//Return response
return await DeserializeObject(response);
}
/// Serialize an object to Json
private StringContent SerializeObject(OrderRequest content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','/api/v1/Orders/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.put('/api/v1/Orders/{id}', headers = headers)
print(r.json())
const inputBody = '{
"client_identifier": "string",
"order_number": "ORD-000009158381-123",
"customer_id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"account_id": 0,
"items": [
{}
],
"shipping_address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"billing_address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"shipments": [
{}
],
"shipping_instructions": "",
"shipping_method": "Standard Shipping",
"currency_code": "CAD",
"seller_currency_code": "USD",
"order_status": "Processing",
"subtotal": 484.99,
"freight": 15.99,
"tax": 24.25,
"discount": 15,
"tax_rate": 0.05,
"total": 525.23,
"ordered_date": "2020-12-01T08:00:00.000Z",
"additional_information": {
"tax_id": "xx-xxxxxxx",
"purchase_order_number": "PO-89838",
"fields": [],
"comments": ""
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Orders/{id}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.put '/api/v1/Orders/{id}',
params: {
}, headers: headers
p JSON.parse(result)
PUT /api/v1/Orders/{id}
Body parameter
{
"client_identifier": "string",
"order_number": "ORD-000009158381-123",
"customer_id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"account_id": 0,
"items": [
{}
],
"shipping_address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"billing_address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"shipments": [
{}
],
"shipping_instructions": "",
"shipping_method": "Standard Shipping",
"currency_code": "CAD",
"seller_currency_code": "USD",
"order_status": "Processing",
"subtotal": 484.99,
"freight": 15.99,
"tax": 24.25,
"discount": 15,
"tax_rate": 0.05,
"total": 525.23,
"ordered_date": "2020-12-01T08:00:00.000Z",
"additional_information": {
"tax_id": "xx-xxxxxxx",
"purchase_order_number": "PO-89838",
"fields": [],
"comments": ""
}
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the Order that will be updated. |
body | body | OrderRequest | false | The Order to be updated. |
client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
order_number | body | string ¦ null | false | A unique identifier for the order |
customer_id | body | string ¦ null | false | The primary identifier for the customer |
account_id | body | integer (int64) ¦ null | false | The account associated with the customer. |
items | body | [OrderItem] ¦ null | false | A list of line item objects, each containing information about an item in the order. |
» id | body | integer (int64) | false | Primary identifier for the line item |
» object | body | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
» client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
» sku_id | body | integer (int64) ¦ null | false | The ID of the SKU that the Order Item is attached to. |
» sku | body | Sku | false | The SKU object contains information about inventory and pricing for a Store. |
» order_id | body | integer (int64) | false | The ID of the Order that the Order Item is attached to. |
» product_id | body | integer (int64) | false | The ID of the Product that the Order Item is attached to. |
» product | body | Product | false | The Product object contains information about products. |
» quantity | body | integer (int32) | false | The number of items that were purchased. |
» model_number | body | string ¦ null | false | The item's MPN (Manufacturer's Part Number). |
» price_per_unit | body | number (double) | false | Customer's Price of each item |
» seller_price_per_unit | body | number (double) | false | Sellers's Price of each item |
» add_ons | body | [OrderItemAddOn] ¦ null | false | A list of add-ons that are attached to the order items |
» unit_of_measure | body | string ¦ null | false | Item Unit of Measure |
shipping_address | body | ShippingAddress | false | The mailing address to where the order will be shipped. |
» client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
» id | body | integer (int64) | false | The primary identifier of the Address. |
» object | body | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
» created_on | body | string (date-time) | false | When the address was created. |
» name | body | string ¦ null | false | Gets or sets the name of the address. |
» first_name | body | string ¦ null | false | The first name of the address contact. |
» last_name | body | string ¦ null | false | The last name of the address contact. |
» company_name | body | string ¦ null | false | The company name of the address contact. |
» city | body | string ¦ null | false | Gets or sets the city. |
» state_code | body | string ¦ null | false | The two-letter abbreviation of the state or province. |
» country_code | body | string ¦ null | false | The two-letter code (ISO 3166-1 alpha-2 two-letter country code) for the country. |
» street1 | body | string ¦ null | false | The primary street address. |
» street2 | body | string ¦ null | false | Optional field for additional information for the street address. |
» postal_code | body | string ¦ null | false | The zip or postal code |
» phone_number | body | string ¦ null | false | The phone number |
» is_primary | body | boolean | false | Is this your main address. Not updateable |
» is_warehouse | body | boolean | false | Is this address only a warehouse? Will not show up on contact pages when true. |
billing_address | body | BillingAddress | false | The mailing address associated with the payment method. |
» client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
» id | body | integer (int64) | false | The primary identifier of the Address. |
» object | body | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
» created_on | body | string (date-time) | false | When the address was created. |
» name | body | string ¦ null | false | Gets or sets the name of the address. |
» first_name | body | string ¦ null | false | The first name of the address contact. |
» last_name | body | string ¦ null | false | The last name of the address contact. |
» company_name | body | string ¦ null | false | The company name of the address contact. |
» city | body | string ¦ null | false | Gets or sets the city. |
» state_code | body | string ¦ null | false | The two-letter abbreviation of the state or province. |
» country_code | body | string ¦ null | false | The two-letter code (ISO 3166-1 alpha-2 two-letter country code) for the country. |
» street1 | body | string ¦ null | false | The primary street address. |
» street2 | body | string ¦ null | false | Optional field for additional information for the street address. |
» postal_code | body | string ¦ null | false | The zip or postal code |
» phone_number | body | string ¦ null | false | The phone number |
» is_primary | body | boolean | false | Is this your main address. Not updateable |
» is_warehouse | body | boolean | false | Is this address only a warehouse? Will not show up on contact pages when true. |
shipments | body | [Shipment] ¦ null | false | List of shipments for the order |
» id | body | integer (int64) | false | The primary identifier of the Shipment |
» object | body | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
» client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
» order_id | body | integer (int64) | false | The ID of the Order that the Shipment is attached to. |
» shipped_date | body | string (date-time) ¦ null | false | The UTC date the Shipment was shipped. |
» estimated_delivery_date | body | string (date-time) ¦ null | false | The UTC date of when Shipment is expected to be delivered. |
» tracking_number | body | string ¦ null | false | The tracking number of the shipment. |
» tracking_url | body | string ¦ null | false | External url where the customer can go to track their shipment. |
» carrier | body | string ¦ null | false | Name of the carrier/courier. If shipment type is Tracked. It must match one of the values in /api/v1/Shipments/Carriers |
» items | body | [ShipmentItem] ¦ null | false | List of items attached to the shipment. |
» add_ons | body | [ShipmentAddOn] ¦ null | false | List of addons attached to the shipment. |
» shipment_type | body | string | false | Gets the shipment type. |
» created_on | body | string (date-time) | false | The UTC date the Shipment was created on. |
» trackings | body | [ShipmentTracking] ¦ null | false | Tracking history of the shipment/ |
» address | body | Address | false | The Address object contains information about a place, or location. |
» status | body | string | false | Gets the shipment status. |
shipping_instructions | body | string ¦ null | false | Special instructions to be used when sending out shipments |
shipping_method | body | string ¦ null | false | How the order is to be shipped |
currency_code | body | string ¦ null | false | The three letter code (ISO 4217) for the currency used for the payment. |
seller_currency_code | body | string ¦ null | false | The three letter code (ISO 4217) for the store's currency. |
order_status | body | string | false | Order statuses are limited to the following pre-defined values: |
subtotal | body | number (double) | false | The subtotal for all the line items of the order in the Customer's currency |
freight | body | number (double) | false | The total freight of the order in the Customer's currency |
tax | body | number (double) | false | The total tax for the order in the Customer's currency |
discount | body | number (double) | false | The total discount for the order in the Customer's currency |
tax_rate | body | number (double) | false | The tax rate of the order |
total | body | number (double) | false | The total amount of the order in the Customer's currency |
ordered_date | body | string (date-time) | false | The UTC date the order was created on. |
additional_information | body | OrderAdditionalInformation | false | none |
» tax_id | body | string ¦ null | false | Customer's Tax Id / ITIN / EIN |
» purchase_order_number | body | string ¦ null | false | Customer's Purchase Order Number |
» fields | body | [OrderAdditionalInformationField] ¦ null | false | Custom fields to display on the order |
» comments | body | string ¦ null | false | The text of optional comments that a customer can attach to the order. |
Detailed descriptions
» sku: The SKU object contains information about inventory and pricing for a Store. An SKU will have a internal name identifier, manufacturer part number, inventory, pricing, and other information related fields for the SKU.
» product: The Product
object contains information about products.
An Product
will have a name, short name, short description, brand, and sku information.
» items: List of items attached to the shipment.
When creating a shipment, leave items empty to attach all remaining items to the shipment automatically.
» add_ons: List of addons attached to the shipment.
When creating a shipment, leave items empty to attach all remaining addons to the shipment automatically.
» shipment_type: Gets the shipment type. - Tracked - If carrier name matches list, all information will be updated from the carrier. - Custom - All information must be supplied and updated by the seller.
» address: The Address object contains information about a place, or location. Examples are - Offices - Warehouses - Shipping Addresses - Billing Addresses
» status: Gets the shipment status. - New - Shipment has not been supplied a Shipped Date yet. - Pending - Shipment has not been submitted to the carrier yet. - InfoReceived - Carrier has received information, but not picked up the shipment yet. - InTransit - Carrier has picked up the shipment, and is on route. - OutForDelivery - Shipment has left the carrier depot, and is out for delivery. - AttemptFail - Carrier could not delivery shipment to customer. - Delivered - Carrier successfully delivered shipment to customer. - AvailableForPickup - Customer must pick up shipment from carrier. - Exception - Something went wrong. - Expired - Took too long for carrier to receive the package. - ReturnToSender - Shipment is being returned to the sender.
order_status: Order statuses are limited to the following pre-defined values:
- New - Order has been placed by the customer, but has not yet been confirmed.
- Processing - Order has been confirmed by the seller, but has not shipped.
- Shipped - Order has been fully shipped, but has not been delivered.
- PartiallyShipped - Some but not all items of an order have been shipped.
- Complete - Order has been delivered.
- Cancelled - Order has been cancelled by the seller or customer .
- RefundRequested - Customer has requested a refund for the order.
- Refunded - Seller has refunded the order.
- RefundRejected - Seller has rejected the refund request.
Enumerated Values
Parameter | Value |
---|---|
» shipment_type | Tracked |
» shipment_type | Custom |
» shipment_type | Pickup |
» status | New |
» status | Pending |
» status | InfoReceived |
» status | InTransit |
» status | OutForDelivery |
» status | AttemptFail |
» status | Delivered |
» status | AvailableForPickup |
» status | Exception |
» status | Expired |
» status | ReturnToSender |
» status | PickedUp |
» status | Unknown |
order_status | New |
order_status | Processing |
order_status | Shipped |
order_status | PartiallyShipped |
order_status | Complete |
order_status | Cancelled |
order_status | Received |
order_status | RefundRequested |
order_status | Refunded |
order_status | RefundRejected |
order_status | StockConfirmed |
order_status | StockPartiallyConfirmed |
order_status | ReadyForPickup |
order_status | PartiallyReadyForPickup |
Example responses
200 Response
{"id":8,"object":"order","client_identifier":"string","shopping_cart_id":43,"order_number":"ORD-000009158381-123","customer_id":"e49fe4dd-b087-439f-8897-bcfc84b5dacc","customer":{"id":"e49fe4dd-b087-439f-8897-bcfc84b5dacc","object":"customer","first_name":"John","last_name":"Smit","company_name":"Widgets Inc","email_address":"john@widgetsinc.com","phone_number":"555-123-1234","account_id":12,"account_name":"Widgets Inc","account_number":"123456","discount_level_id":14,"discount_level_name":"PRICELEVEL-1"},"items":[{}],"shipping_address":{"client_identifier":"string","id":8,"object":"address","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","first_name":"string","last_name":"string","company_name":"string","city":"Main Office","state_code":"TX","country_code":"US","street1":"915 W Dallas St","street2":"Unit 112","postal_code":"77019","phone_number":"+1 713-123-1234","is_primary":true,"is_warehouse":true},"billing_address":{"client_identifier":"string","id":8,"object":"address","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","first_name":"string","last_name":"string","company_name":"string","city":"Main Office","state_code":"TX","country_code":"US","street1":"915 W Dallas St","street2":"Unit 112","postal_code":"77019","phone_number":"+1 713-123-1234","is_primary":true,"is_warehouse":true},"shipments":[{}],"shipping_instructions":"","shipping_method":"Standard Shipping","currency_code":"CAD","seller_currency_code":"USD","order_status":"Processing","payment_method":"CreditCard","subtotal":484.99,"freight":15.99,"tax":24.25,"discount":15,"tax_rate":0.05,"transaction_fee":31.23,"total":525.23,"exchange_rate":0.75,"seller_subtotal":363.74,"seller_freight":11.99,"seller_tax":18.19,"seller_discount":10,"seller_transaction_fee":31.23,"seller_total":393.917,"ordered_date":"2020-12-01T08:00:00.000Z","additional_information":{"tax_id":"xx-xxxxxxx","purchase_order_number":"PO-89838","fields":[],"comments":""},"url":"https://domain.com/order/x1D"}
{
"id": 8,
"object": "order",
"client_identifier": "string",
"shopping_cart_id": 43,
"order_number": "ORD-000009158381-123",
"customer_id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"customer": {
"id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"object": "customer",
"first_name": "John",
"last_name": "Smit",
"company_name": "Widgets Inc",
"email_address": "john@widgetsinc.com",
"phone_number": "555-123-1234",
"account_id": 12,
"account_name": "Widgets Inc",
"account_number": "123456",
"discount_level_id": 14,
"discount_level_name": "PRICELEVEL-1"
},
"items": [
{}
],
"shipping_address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"billing_address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"shipments": [
{}
],
"shipping_instructions": "",
"shipping_method": "Standard Shipping",
"currency_code": "CAD",
"seller_currency_code": "USD",
"order_status": "Processing",
"payment_method": "CreditCard",
"subtotal": 484.99,
"freight": 15.99,
"tax": 24.25,
"discount": 15,
"tax_rate": 0.05,
"transaction_fee": 31.23,
"total": 525.23,
"exchange_rate": 0.75,
"seller_subtotal": 363.74,
"seller_freight": 11.99,
"seller_tax": 18.19,
"seller_discount": 10,
"seller_transaction_fee": 31.23,
"seller_total": 393.917,
"ordered_date": "2020-12-01T08:00:00.000Z",
"additional_information": {
"tax_id": "xx-xxxxxxx",
"purchase_order_number": "PO-89838",
"fields": [],
"comments": ""
},
"url": "https://domain.com/order/x1D"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Order was successfully updated. | Order |
400 | Bad Request | Order could not be updated. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Delete a Order
Code samples
# You can also use wget
curl -X DELETE /api/v1/Orders/{id} \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeDeleteRequest()
{
int id = 1;
string url = "/api/v1/Orders/{id}";
await DeleteAsync(id, url);
}
/// Performs a DELETE Request
public async Task DeleteAsync(int id, string url)
{
//Execute DELETE request
HttpResponseMessage response = await Client.DeleteAsync(url + $"/{id}");
//Return response
await DeserializeObject(response);
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','/api/v1/Orders/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.delete('/api/v1/Orders/{id}', headers = headers)
print(r.json())
const headers = {
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Orders/{id}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.delete '/api/v1/Orders/{id}',
params: {
}, headers: headers
p JSON.parse(result)
DELETE /api/v1/Orders/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | Primary identifier of the Order to delete |
Example responses
200 Response
{"id":8,"object":"order","client_identifier":"string","shopping_cart_id":43,"order_number":"ORD-000009158381-123","customer_id":"e49fe4dd-b087-439f-8897-bcfc84b5dacc","customer":{"id":"e49fe4dd-b087-439f-8897-bcfc84b5dacc","object":"customer","first_name":"John","last_name":"Smit","company_name":"Widgets Inc","email_address":"john@widgetsinc.com","phone_number":"555-123-1234","account_id":12,"account_name":"Widgets Inc","account_number":"123456","discount_level_id":14,"discount_level_name":"PRICELEVEL-1"},"items":[{}],"shipping_address":{"client_identifier":"string","id":8,"object":"address","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","first_name":"string","last_name":"string","company_name":"string","city":"Main Office","state_code":"TX","country_code":"US","street1":"915 W Dallas St","street2":"Unit 112","postal_code":"77019","phone_number":"+1 713-123-1234","is_primary":true,"is_warehouse":true},"billing_address":{"client_identifier":"string","id":8,"object":"address","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","first_name":"string","last_name":"string","company_name":"string","city":"Main Office","state_code":"TX","country_code":"US","street1":"915 W Dallas St","street2":"Unit 112","postal_code":"77019","phone_number":"+1 713-123-1234","is_primary":true,"is_warehouse":true},"shipments":[{}],"shipping_instructions":"","shipping_method":"Standard Shipping","currency_code":"CAD","seller_currency_code":"USD","order_status":"Processing","payment_method":"CreditCard","subtotal":484.99,"freight":15.99,"tax":24.25,"discount":15,"tax_rate":0.05,"transaction_fee":31.23,"total":525.23,"exchange_rate":0.75,"seller_subtotal":363.74,"seller_freight":11.99,"seller_tax":18.19,"seller_discount":10,"seller_transaction_fee":31.23,"seller_total":393.917,"ordered_date":"2020-12-01T08:00:00.000Z","additional_information":{"tax_id":"xx-xxxxxxx","purchase_order_number":"PO-89838","fields":[],"comments":""},"url":"https://domain.com/order/x1D"}
{
"id": 8,
"object": "order",
"client_identifier": "string",
"shopping_cart_id": 43,
"order_number": "ORD-000009158381-123",
"customer_id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"customer": {
"id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"object": "customer",
"first_name": "John",
"last_name": "Smit",
"company_name": "Widgets Inc",
"email_address": "john@widgetsinc.com",
"phone_number": "555-123-1234",
"account_id": 12,
"account_name": "Widgets Inc",
"account_number": "123456",
"discount_level_id": 14,
"discount_level_name": "PRICELEVEL-1"
},
"items": [
{}
],
"shipping_address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"billing_address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"shipments": [
{}
],
"shipping_instructions": "",
"shipping_method": "Standard Shipping",
"currency_code": "CAD",
"seller_currency_code": "USD",
"order_status": "Processing",
"payment_method": "CreditCard",
"subtotal": 484.99,
"freight": 15.99,
"tax": 24.25,
"discount": 15,
"tax_rate": 0.05,
"transaction_fee": 31.23,
"total": 525.23,
"exchange_rate": 0.75,
"seller_subtotal": 363.74,
"seller_freight": 11.99,
"seller_tax": 18.19,
"seller_discount": 10,
"seller_transaction_fee": 31.23,
"seller_total": 393.917,
"ordered_date": "2020-12-01T08:00:00.000Z",
"additional_information": {
"tax_id": "xx-xxxxxxx",
"purchase_order_number": "PO-89838",
"fields": [],
"comments": ""
},
"url": "https://domain.com/order/x1D"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Order successfully deleted. | Order |
400 | Bad Request | Bad Request | ValidationProblemDetails |
401 | Unauthorized | Unauthorized | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Cancel an Order
If an Order has had a Shipment added to it, it cannot be cancelled. The Order will need to be refunded in this case.
Code samples
# You can also use wget
curl -X PUT /api/v1/Orders/cancel/{id} \
-H 'Content-Type: application/json' \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePutRequest()
{
int id = 1;
string url = "/api/v1/Orders/cancel/{id}";
string json = @"{
""expand"": [
""string""
],
""message"": ""string""
}";
OrderCancelOptions content = JsonConvert.DeserializeObject(json);
var result = await PutAsync(id, content, url);
}
/// Performs a PUT Request
public async Task PutAsync(int id, OrderCancelOptions content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute PUT request
HttpResponseMessage response = await Client.PutAsync(url + $"/{id}", jsonContent);
//Return response
return await DeserializeObject(response);
}
/// Serialize an object to Json
private StringContent SerializeObject(OrderCancelOptions content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','/api/v1/Orders/cancel/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.put('/api/v1/Orders/cancel/{id}', headers = headers)
print(r.json())
const inputBody = '{
"expand": [
"string"
],
"message": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Orders/cancel/{id}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.put '/api/v1/Orders/cancel/{id}',
params: {
}, headers: headers
p JSON.parse(result)
PUT /api/v1/Orders/cancel/{id}
Body parameter
{
"expand": [
"string"
],
"message": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the Order that will be updated. |
body | body | OrderCancelOptions | false | The message sent to the customer when cancelling an Order. |
expand | body | [string] ¦ null | false | Array of strings for child properties to expand. |
message | body | string ¦ null | false | none |
Example responses
200 Response
{"id":8,"object":"order","client_identifier":"string","shopping_cart_id":43,"order_number":"ORD-000009158381-123","customer_id":"e49fe4dd-b087-439f-8897-bcfc84b5dacc","customer":{"id":"e49fe4dd-b087-439f-8897-bcfc84b5dacc","object":"customer","first_name":"John","last_name":"Smit","company_name":"Widgets Inc","email_address":"john@widgetsinc.com","phone_number":"555-123-1234","account_id":12,"account_name":"Widgets Inc","account_number":"123456","discount_level_id":14,"discount_level_name":"PRICELEVEL-1"},"items":[{}],"shipping_address":{"client_identifier":"string","id":8,"object":"address","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","first_name":"string","last_name":"string","company_name":"string","city":"Main Office","state_code":"TX","country_code":"US","street1":"915 W Dallas St","street2":"Unit 112","postal_code":"77019","phone_number":"+1 713-123-1234","is_primary":true,"is_warehouse":true},"billing_address":{"client_identifier":"string","id":8,"object":"address","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","first_name":"string","last_name":"string","company_name":"string","city":"Main Office","state_code":"TX","country_code":"US","street1":"915 W Dallas St","street2":"Unit 112","postal_code":"77019","phone_number":"+1 713-123-1234","is_primary":true,"is_warehouse":true},"shipments":[{}],"shipping_instructions":"","shipping_method":"Standard Shipping","currency_code":"CAD","seller_currency_code":"USD","order_status":"Processing","payment_method":"CreditCard","subtotal":484.99,"freight":15.99,"tax":24.25,"discount":15,"tax_rate":0.05,"transaction_fee":31.23,"total":525.23,"exchange_rate":0.75,"seller_subtotal":363.74,"seller_freight":11.99,"seller_tax":18.19,"seller_discount":10,"seller_transaction_fee":31.23,"seller_total":393.917,"ordered_date":"2020-12-01T08:00:00.000Z","additional_information":{"tax_id":"xx-xxxxxxx","purchase_order_number":"PO-89838","fields":[],"comments":""},"url":"https://domain.com/order/x1D"}
{
"id": 8,
"object": "order",
"client_identifier": "string",
"shopping_cart_id": 43,
"order_number": "ORD-000009158381-123",
"customer_id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"customer": {
"id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"object": "customer",
"first_name": "John",
"last_name": "Smit",
"company_name": "Widgets Inc",
"email_address": "john@widgetsinc.com",
"phone_number": "555-123-1234",
"account_id": 12,
"account_name": "Widgets Inc",
"account_number": "123456",
"discount_level_id": 14,
"discount_level_name": "PRICELEVEL-1"
},
"items": [
{}
],
"shipping_address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"billing_address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"shipments": [
{}
],
"shipping_instructions": "",
"shipping_method": "Standard Shipping",
"currency_code": "CAD",
"seller_currency_code": "USD",
"order_status": "Processing",
"payment_method": "CreditCard",
"subtotal": 484.99,
"freight": 15.99,
"tax": 24.25,
"discount": 15,
"tax_rate": 0.05,
"transaction_fee": 31.23,
"total": 525.23,
"exchange_rate": 0.75,
"seller_subtotal": 363.74,
"seller_freight": 11.99,
"seller_tax": 18.19,
"seller_discount": 10,
"seller_transaction_fee": 31.23,
"seller_total": 393.917,
"ordered_date": "2020-12-01T08:00:00.000Z",
"additional_information": {
"tax_id": "xx-xxxxxxx",
"purchase_order_number": "PO-89838",
"fields": [],
"comments": ""
},
"url": "https://domain.com/order/x1D"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Order was successfully updated. | Order |
400 | Bad Request | Order could not be updated. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Confirm an Order
Once an Order is confirmed, Shipments can be added to the Order.
Code samples
# You can also use wget
curl -X PUT /api/v1/Orders/confirm/{id} \
-H 'Content-Type: application/json' \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePutRequest()
{
int id = 1;
string url = "/api/v1/Orders/confirm/{id}";
string json = @"{
""expand"": [
""string""
],
""confirm_stock"": true
}";
OrderConfirmOptions content = JsonConvert.DeserializeObject(json);
var result = await PutAsync(id, content, url);
}
/// Performs a PUT Request
public async Task PutAsync(int id, OrderConfirmOptions content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute PUT request
HttpResponseMessage response = await Client.PutAsync(url + $"/{id}", jsonContent);
//Return response
return await DeserializeObject(response);
}
/// Serialize an object to Json
private StringContent SerializeObject(OrderConfirmOptions content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','/api/v1/Orders/confirm/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.put('/api/v1/Orders/confirm/{id}', headers = headers)
print(r.json())
const inputBody = '{
"expand": [
"string"
],
"confirm_stock": true
}';
const headers = {
'Content-Type':'application/json',
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Orders/confirm/{id}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.put '/api/v1/Orders/confirm/{id}',
params: {
}, headers: headers
p JSON.parse(result)
PUT /api/v1/Orders/confirm/{id}
Body parameter
{
"expand": [
"string"
],
"confirm_stock": true
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the Order that will be confirmed. |
body | body | OrderConfirmOptions | false | none |
expand | body | [string] ¦ null | false | Array of strings for child properties to expand. |
confirm_stock | body | boolean | false | Will confirm and capture the payment for all order items when confirming the order. |
Example responses
200 Response
{"id":8,"object":"order","client_identifier":"string","shopping_cart_id":43,"order_number":"ORD-000009158381-123","customer_id":"e49fe4dd-b087-439f-8897-bcfc84b5dacc","customer":{"id":"e49fe4dd-b087-439f-8897-bcfc84b5dacc","object":"customer","first_name":"John","last_name":"Smit","company_name":"Widgets Inc","email_address":"john@widgetsinc.com","phone_number":"555-123-1234","account_id":12,"account_name":"Widgets Inc","account_number":"123456","discount_level_id":14,"discount_level_name":"PRICELEVEL-1"},"items":[{}],"shipping_address":{"client_identifier":"string","id":8,"object":"address","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","first_name":"string","last_name":"string","company_name":"string","city":"Main Office","state_code":"TX","country_code":"US","street1":"915 W Dallas St","street2":"Unit 112","postal_code":"77019","phone_number":"+1 713-123-1234","is_primary":true,"is_warehouse":true},"billing_address":{"client_identifier":"string","id":8,"object":"address","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","first_name":"string","last_name":"string","company_name":"string","city":"Main Office","state_code":"TX","country_code":"US","street1":"915 W Dallas St","street2":"Unit 112","postal_code":"77019","phone_number":"+1 713-123-1234","is_primary":true,"is_warehouse":true},"shipments":[{}],"shipping_instructions":"","shipping_method":"Standard Shipping","currency_code":"CAD","seller_currency_code":"USD","order_status":"Processing","payment_method":"CreditCard","subtotal":484.99,"freight":15.99,"tax":24.25,"discount":15,"tax_rate":0.05,"transaction_fee":31.23,"total":525.23,"exchange_rate":0.75,"seller_subtotal":363.74,"seller_freight":11.99,"seller_tax":18.19,"seller_discount":10,"seller_transaction_fee":31.23,"seller_total":393.917,"ordered_date":"2020-12-01T08:00:00.000Z","additional_information":{"tax_id":"xx-xxxxxxx","purchase_order_number":"PO-89838","fields":[],"comments":""},"url":"https://domain.com/order/x1D"}
{
"id": 8,
"object": "order",
"client_identifier": "string",
"shopping_cart_id": 43,
"order_number": "ORD-000009158381-123",
"customer_id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"customer": {
"id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"object": "customer",
"first_name": "John",
"last_name": "Smit",
"company_name": "Widgets Inc",
"email_address": "john@widgetsinc.com",
"phone_number": "555-123-1234",
"account_id": 12,
"account_name": "Widgets Inc",
"account_number": "123456",
"discount_level_id": 14,
"discount_level_name": "PRICELEVEL-1"
},
"items": [
{}
],
"shipping_address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"billing_address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"shipments": [
{}
],
"shipping_instructions": "",
"shipping_method": "Standard Shipping",
"currency_code": "CAD",
"seller_currency_code": "USD",
"order_status": "Processing",
"payment_method": "CreditCard",
"subtotal": 484.99,
"freight": 15.99,
"tax": 24.25,
"discount": 15,
"tax_rate": 0.05,
"transaction_fee": 31.23,
"total": 525.23,
"exchange_rate": 0.75,
"seller_subtotal": 363.74,
"seller_freight": 11.99,
"seller_tax": 18.19,
"seller_discount": 10,
"seller_transaction_fee": 31.23,
"seller_total": 393.917,
"ordered_date": "2020-12-01T08:00:00.000Z",
"additional_information": {
"tax_id": "xx-xxxxxxx",
"purchase_order_number": "PO-89838",
"fields": [],
"comments": ""
},
"url": "https://domain.com/order/x1D"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Order was successfully updated. | Order |
400 | Bad Request | Order could not be updated. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
OrderShipments
Retrieve a List of Shipments
A maximum of 100 records can be requested at once. If more records are needed, a page can be supplied to get the next set of records. If no IDs are supplied, all available Shipments (up to the maximum) will be returned.
Code samples
# You can also use wget
curl -X GET /api/v1/orders/{orderId}/shipments \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/orders/{orderId}/shipments";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/orders/{orderId}/shipments', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/orders/{orderId}/shipments', headers = headers)
print(r.json())
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/orders/{orderId}/shipments',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/orders/{orderId}/shipments',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/orders/{orderId}/shipments
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
orderId | path | integer(int64) | true | The ID of the Order for the Shipment bbeing requested. |
Statuses | query | array[string] | false | Return only Shipments with corresponding statuses. |
CreatedOnMin | query | string(date-time) | false | The minimum created on date for the list of Shipments. Must be less than or equal to CreatedOnMax . |
CreatedOnMax | query | string(date-time) | false | The maximum created on date for the list of Shipments. Must be greater than or equal to CreatedOnMin . |
SinceId | query | integer(int64) | false | The Shpment with this ID as well as Shipments created before it will be excluded from the response. |
Ids | query | array[integer] | false | The IDs of the objects that are being requested. |
Page | query | integer(int32) | false | The page of the results. |
Limit | query | integer(int32) | false | A limit on the number of objects to be returned, between 1 and 100. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Enumerated Values
Parameter | Value |
---|---|
Statuses | New |
Statuses | Pending |
Statuses | InfoReceived |
Statuses | InTransit |
Statuses | OutForDelivery |
Statuses | AttemptFail |
Statuses | Delivered |
Statuses | AvailableForPickup |
Statuses | Exception |
Statuses | Expired |
Statuses | ReturnToSender |
Statuses | PickedUp |
Statuses | Unknown |
Example responses
200 Response
{
"object": "list",
"data": [
{}
],
"has_more": true,
"total_items": 0,
"url": "string",
"count": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Shipments successfully retrieved. | Shipments |
400 | Bad Request | Shipments could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Create a New Shipment
Code samples
# You can also use wget
curl -X POST /api/v1/orders/{orderId}/shipments \
-H 'Content-Type: application/json' \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePostRequest()
{
string url = "/api/v1/orders/{orderId}/shipments";
string json = @"{
""client_identifier"": ""string"",
""order_id"": 2,
""shipped_date"": ""2020-12-01T08:00:00.000Z"",
""estimated_delivery_date"": ""2020-12-08T08:00:00.000Z"",
""tracking_number"": ""2000000002"",
""tracking_url"": ""https://www.fedex.com/apps/fedextrack/?action=track%26trackingnumber=2000000002%26cntry_code=ca%26locale=en_CA"",
""carrier"": ""FedEx"",
""items"": [
{}
],
""shipment_type"": ""Tracked"",
""send_email"": true,
""address_id"": 12345
}";
ShipmentRequest content = JsonConvert.DeserializeObject(json);
await PostAsync(content, url);
}
/// Performs a POST Request
public async Task PostAsync(ShipmentRequest content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute POST request
HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
}
/// Serialize an object to Json
private StringContent SerializeObject(ShipmentRequest content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api/v1/orders/{orderId}/shipments', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/api/v1/orders/{orderId}/shipments', headers = headers)
print(r.json())
const inputBody = '{
"client_identifier": "string",
"order_id": 2,
"shipped_date": "2020-12-01T08:00:00.000Z",
"estimated_delivery_date": "2020-12-08T08:00:00.000Z",
"tracking_number": "2000000002",
"tracking_url": "https://www.fedex.com/apps/fedextrack/?action=track%26trackingnumber=2000000002%26cntry_code=ca%26locale=en_CA",
"carrier": "FedEx",
"items": [
{}
],
"shipment_type": "Tracked",
"send_email": true,
"address_id": 12345
}';
const headers = {
'Content-Type':'application/json',
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/orders/{orderId}/shipments',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/api/v1/orders/{orderId}/shipments',
params: {
}, headers: headers
p JSON.parse(result)
POST /api/v1/orders/{orderId}/shipments
Body parameter
{
"client_identifier": "string",
"order_id": 2,
"shipped_date": "2020-12-01T08:00:00.000Z",
"estimated_delivery_date": "2020-12-08T08:00:00.000Z",
"tracking_number": "2000000002",
"tracking_url": "https://www.fedex.com/apps/fedextrack/?action=track%26trackingnumber=2000000002%26cntry_code=ca%26locale=en_CA",
"carrier": "FedEx",
"items": [
{}
],
"shipment_type": "Tracked",
"send_email": true,
"address_id": 12345
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
orderId | path | integer(int64) | true | The ID of the Order for the Shipment bbeing requested. |
body | body | ShipmentRequest | false | The Shipment to be created. |
client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
order_id | body | integer (int64) | false | The ID of the Order that the Shipment is attached to. |
shipped_date | body | string (date-time) ¦ null | false | The UTC date the Shipment was shipped. |
estimated_delivery_date | body | string (date-time) ¦ null | false | The UTC date of when Shipment is expected to be delivered. |
tracking_number | body | string ¦ null | false | The tracking number of the shipment. |
tracking_url | body | string ¦ null | false | External url where the customer can go to track their shipment. |
carrier | body | string ¦ null | false | Name of the carrier/courier. If shipment type is Tracked. It must match one of the values in /api/v1/Shipments/Carriers |
items | body | [ShipmentItemRequest] ¦ null | false | List of items attached to the shipment. |
» order_item_id | body | integer (int64) | false | The ID of the OrderItem that the Shipment Item is attached to. |
» sku_id | body | integer (int64) ¦ null | false | Optional: The ID of the SKU that the Shipment Item is attached to. |
» quantity | body | integer (int32) ¦ null | false | The quantity of the item being shipped. |
» add_ons | body | [ShipmentItemAddOnRequest] ¦ null | false | List of items attached to the shipment. |
shipment_type | body | string | false | Gets the shipment type. |
send_email | body | boolean | false | Send a system generated email to the customer, set to false if using your own emails. |
address_id | body | integer (int64) ¦ null | false | If the ShipmentType is Pickup then this references the Pickup Location. |
Detailed descriptions
items: List of items attached to the shipment.
When creating a shipment, leave items empty to attach all remaining items to the shipment automatically.
Include this list of ShipmentItem
to create or update Shipment Items for the Shipment.
» quantity: The quantity of the item being shipped.
Leave empty to ship all remaining items.
» add_ons: List of items attached to the shipment.
Include this list of AddOns
to create or update Shipment AddOns for the Shipment.
shipment_type: Gets the shipment type. - Tracked - If carrier name matches list, all information will be updated from the carrier. - Custom - All information must be supplied and updated by the seller.
Enumerated Values
Parameter | Value |
---|---|
shipment_type | Tracked |
shipment_type | Custom |
shipment_type | Pickup |
Example responses
200 Response
{"id":3543,"object":"shipment","client_identifier":"string","order_id":2,"shipped_date":"2020-12-01T08:00:00.000Z","estimated_delivery_date":"2020-12-08T08:00:00.000Z","tracking_number":"2000000002","tracking_url":"https://www.fedex.com/apps/fedextrack/?action=track%26trackingnumber=2000000002%26cntry_code=ca%26locale=en_CA","carrier":"FedEx","items":[{}],"add_ons":[{}],"shipment_type":"Tracked","created_on":"2020-12-01T08:00:00.000Z","trackings":[{}],"address":{"client_identifier":"string","id":8,"object":"address","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","first_name":"string","last_name":"string","company_name":"string","city":"Main Office","state_code":"TX","country_code":"US","street1":"915 W Dallas St","street2":"Unit 112","postal_code":"77019","phone_number":"+1 713-123-1234","is_primary":true,"is_warehouse":true},"status":"InTransit"}
{
"id": 3543,
"object": "shipment",
"client_identifier": "string",
"order_id": 2,
"shipped_date": "2020-12-01T08:00:00.000Z",
"estimated_delivery_date": "2020-12-08T08:00:00.000Z",
"tracking_number": "2000000002",
"tracking_url": "https://www.fedex.com/apps/fedextrack/?action=track%26trackingnumber=2000000002%26cntry_code=ca%26locale=en_CA",
"carrier": "FedEx",
"items": [
{}
],
"add_ons": [
{}
],
"shipment_type": "Tracked",
"created_on": "2020-12-01T08:00:00.000Z",
"trackings": [
{}
],
"address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"status": "InTransit"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Shipment was successfully created. | Shipment |
400 | Bad Request | Shipment could not be created. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Retrieve a Shipment
Code samples
# You can also use wget
curl -X GET /api/v1/orders/{orderId}/shipments/{id} \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/orders/{orderId}/shipments/{id}";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/orders/{orderId}/shipments/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/orders/{orderId}/shipments/{id}', headers = headers)
print(r.json())
const headers = {
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/orders/{orderId}/shipments/{id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/orders/{orderId}/shipments/{id}',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/orders/{orderId}/shipments/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
orderId | path | integer(int64) | true | The ID of the Order for the Shipment bbeing requested. |
id | path | integer(int64) | true | The ID of the Shipment being requested. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Example responses
200 Response
{"id":3543,"object":"shipment","client_identifier":"string","order_id":2,"shipped_date":"2020-12-01T08:00:00.000Z","estimated_delivery_date":"2020-12-08T08:00:00.000Z","tracking_number":"2000000002","tracking_url":"https://www.fedex.com/apps/fedextrack/?action=track%26trackingnumber=2000000002%26cntry_code=ca%26locale=en_CA","carrier":"FedEx","items":[{}],"add_ons":[{}],"shipment_type":"Tracked","created_on":"2020-12-01T08:00:00.000Z","trackings":[{}],"address":{"client_identifier":"string","id":8,"object":"address","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","first_name":"string","last_name":"string","company_name":"string","city":"Main Office","state_code":"TX","country_code":"US","street1":"915 W Dallas St","street2":"Unit 112","postal_code":"77019","phone_number":"+1 713-123-1234","is_primary":true,"is_warehouse":true},"status":"InTransit"}
{
"id": 3543,
"object": "shipment",
"client_identifier": "string",
"order_id": 2,
"shipped_date": "2020-12-01T08:00:00.000Z",
"estimated_delivery_date": "2020-12-08T08:00:00.000Z",
"tracking_number": "2000000002",
"tracking_url": "https://www.fedex.com/apps/fedextrack/?action=track%26trackingnumber=2000000002%26cntry_code=ca%26locale=en_CA",
"carrier": "FedEx",
"items": [
{}
],
"add_ons": [
{}
],
"shipment_type": "Tracked",
"created_on": "2020-12-01T08:00:00.000Z",
"trackings": [
{}
],
"address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"status": "InTransit"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Shipment successfully retrieved. | Shipment |
400 | Bad Request | Shipment could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Update a Shipment
Code samples
# You can also use wget
curl -X PUT /api/v1/orders/{orderId}/shipments/{id} \
-H 'Content-Type: application/json' \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePutRequest()
{
int id = 1;
string url = "/api/v1/orders/{orderId}/shipments/{id}";
string json = @"{
""client_identifier"": ""string"",
""order_id"": 2,
""shipped_date"": ""2020-12-01T08:00:00.000Z"",
""estimated_delivery_date"": ""2020-12-08T08:00:00.000Z"",
""tracking_number"": ""2000000002"",
""tracking_url"": ""https://www.fedex.com/apps/fedextrack/?action=track%26trackingnumber=2000000002%26cntry_code=ca%26locale=en_CA"",
""carrier"": ""FedEx"",
""items"": [
{}
],
""shipment_type"": ""Tracked"",
""send_email"": true,
""address_id"": 12345
}";
ShipmentRequest content = JsonConvert.DeserializeObject(json);
var result = await PutAsync(id, content, url);
}
/// Performs a PUT Request
public async Task PutAsync(int id, ShipmentRequest content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute PUT request
HttpResponseMessage response = await Client.PutAsync(url + $"/{id}", jsonContent);
//Return response
return await DeserializeObject(response);
}
/// Serialize an object to Json
private StringContent SerializeObject(ShipmentRequest content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','/api/v1/orders/{orderId}/shipments/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.put('/api/v1/orders/{orderId}/shipments/{id}', headers = headers)
print(r.json())
const inputBody = '{
"client_identifier": "string",
"order_id": 2,
"shipped_date": "2020-12-01T08:00:00.000Z",
"estimated_delivery_date": "2020-12-08T08:00:00.000Z",
"tracking_number": "2000000002",
"tracking_url": "https://www.fedex.com/apps/fedextrack/?action=track%26trackingnumber=2000000002%26cntry_code=ca%26locale=en_CA",
"carrier": "FedEx",
"items": [
{}
],
"shipment_type": "Tracked",
"send_email": true,
"address_id": 12345
}';
const headers = {
'Content-Type':'application/json',
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/orders/{orderId}/shipments/{id}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.put '/api/v1/orders/{orderId}/shipments/{id}',
params: {
}, headers: headers
p JSON.parse(result)
PUT /api/v1/orders/{orderId}/shipments/{id}
Body parameter
{
"client_identifier": "string",
"order_id": 2,
"shipped_date": "2020-12-01T08:00:00.000Z",
"estimated_delivery_date": "2020-12-08T08:00:00.000Z",
"tracking_number": "2000000002",
"tracking_url": "https://www.fedex.com/apps/fedextrack/?action=track%26trackingnumber=2000000002%26cntry_code=ca%26locale=en_CA",
"carrier": "FedEx",
"items": [
{}
],
"shipment_type": "Tracked",
"send_email": true,
"address_id": 12345
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
orderId | path | integer(int64) | true | The ID of the Order for the Shipment bbeing requested. |
id | path | integer(int64) | true | The ID of the Shipment that will be updated. |
body | body | ShipmentRequest | false | The Shipment to be updated. |
client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
order_id | body | integer (int64) | false | The ID of the Order that the Shipment is attached to. |
shipped_date | body | string (date-time) ¦ null | false | The UTC date the Shipment was shipped. |
estimated_delivery_date | body | string (date-time) ¦ null | false | The UTC date of when Shipment is expected to be delivered. |
tracking_number | body | string ¦ null | false | The tracking number of the shipment. |
tracking_url | body | string ¦ null | false | External url where the customer can go to track their shipment. |
carrier | body | string ¦ null | false | Name of the carrier/courier. If shipment type is Tracked. It must match one of the values in /api/v1/Shipments/Carriers |
items | body | [ShipmentItemRequest] ¦ null | false | List of items attached to the shipment. |
» order_item_id | body | integer (int64) | false | The ID of the OrderItem that the Shipment Item is attached to. |
» sku_id | body | integer (int64) ¦ null | false | Optional: The ID of the SKU that the Shipment Item is attached to. |
» quantity | body | integer (int32) ¦ null | false | The quantity of the item being shipped. |
» add_ons | body | [ShipmentItemAddOnRequest] ¦ null | false | List of items attached to the shipment. |
shipment_type | body | string | false | Gets the shipment type. |
send_email | body | boolean | false | Send a system generated email to the customer, set to false if using your own emails. |
address_id | body | integer (int64) ¦ null | false | If the ShipmentType is Pickup then this references the Pickup Location. |
Detailed descriptions
items: List of items attached to the shipment.
When creating a shipment, leave items empty to attach all remaining items to the shipment automatically.
Include this list of ShipmentItem
to create or update Shipment Items for the Shipment.
» quantity: The quantity of the item being shipped.
Leave empty to ship all remaining items.
» add_ons: List of items attached to the shipment.
Include this list of AddOns
to create or update Shipment AddOns for the Shipment.
shipment_type: Gets the shipment type. - Tracked - If carrier name matches list, all information will be updated from the carrier. - Custom - All information must be supplied and updated by the seller.
Enumerated Values
Parameter | Value |
---|---|
shipment_type | Tracked |
shipment_type | Custom |
shipment_type | Pickup |
Example responses
200 Response
{"id":3543,"object":"shipment","client_identifier":"string","order_id":2,"shipped_date":"2020-12-01T08:00:00.000Z","estimated_delivery_date":"2020-12-08T08:00:00.000Z","tracking_number":"2000000002","tracking_url":"https://www.fedex.com/apps/fedextrack/?action=track%26trackingnumber=2000000002%26cntry_code=ca%26locale=en_CA","carrier":"FedEx","items":[{}],"add_ons":[{}],"shipment_type":"Tracked","created_on":"2020-12-01T08:00:00.000Z","trackings":[{}],"address":{"client_identifier":"string","id":8,"object":"address","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","first_name":"string","last_name":"string","company_name":"string","city":"Main Office","state_code":"TX","country_code":"US","street1":"915 W Dallas St","street2":"Unit 112","postal_code":"77019","phone_number":"+1 713-123-1234","is_primary":true,"is_warehouse":true},"status":"InTransit"}
{
"id": 3543,
"object": "shipment",
"client_identifier": "string",
"order_id": 2,
"shipped_date": "2020-12-01T08:00:00.000Z",
"estimated_delivery_date": "2020-12-08T08:00:00.000Z",
"tracking_number": "2000000002",
"tracking_url": "https://www.fedex.com/apps/fedextrack/?action=track%26trackingnumber=2000000002%26cntry_code=ca%26locale=en_CA",
"carrier": "FedEx",
"items": [
{}
],
"add_ons": [
{}
],
"shipment_type": "Tracked",
"created_on": "2020-12-01T08:00:00.000Z",
"trackings": [
{}
],
"address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"status": "InTransit"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Shipment was successfully updated. | Shipment |
400 | Bad Request | Shipment could not be updated. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
PriceDiscounts
Retrieve a List of SKU Discounts
A maximum of 100 records can be requested at once. If more records are needed, a page can be supplied to get the next set of records. If no IDs are supplied, all available SKU Discounts (up to the maximum) will be returned.
Code samples
# You can also use wget
curl -X GET /api/v1/PriceDiscounts \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/PriceDiscounts";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/PriceDiscounts', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/PriceDiscounts', headers = headers)
print(r.json())
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/PriceDiscounts',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/PriceDiscounts',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/PriceDiscounts
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Ids | query | array[integer] | false | The IDs of the objects that are being requested. |
Page | query | integer(int32) | false | The page of the results. |
Limit | query | integer(int32) | false | A limit on the number of objects to be returned, between 1 and 100. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Example responses
200 Response
{
"object": "list",
"data": [
{}
],
"has_more": true,
"total_items": 0,
"url": "string",
"count": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | SKU Discounts successfully retrieved. | PriceDiscounts |
400 | Bad Request | SKU Discounts could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Retrieve a SKU Discount
Code samples
# You can also use wget
curl -X GET /api/v1/PriceDiscounts/{id} \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/PriceDiscounts/{id}";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/PriceDiscounts/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/PriceDiscounts/{id}', headers = headers)
print(r.json())
const headers = {
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/PriceDiscounts/{id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/PriceDiscounts/{id}',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/PriceDiscounts/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the SKU Discount being requested. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Example responses
200 Response
{"id":12321,"object":"discount","client_identifier":"","percent_discount":25,"discount_level_id":0}
{
"id": 12321,
"object": "discount",
"client_identifier": "",
"percent_discount": 25,
"discount_level_id": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | SKU Discount successfully retrieved. | PriceDiscount |
400 | Bad Request | SKU Discount could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Delete an SKU Discount
Code samples
# You can also use wget
curl -X DELETE /api/v1/PriceDiscounts/{id} \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeDeleteRequest()
{
int id = 1;
string url = "/api/v1/PriceDiscounts/{id}";
await DeleteAsync(id, url);
}
/// Performs a DELETE Request
public async Task DeleteAsync(int id, string url)
{
//Execute DELETE request
HttpResponseMessage response = await Client.DeleteAsync(url + $"/{id}");
//Return response
await DeserializeObject(response);
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','/api/v1/PriceDiscounts/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.delete('/api/v1/PriceDiscounts/{id}', headers = headers)
print(r.json())
const headers = {
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/PriceDiscounts/{id}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.delete '/api/v1/PriceDiscounts/{id}',
params: {
}, headers: headers
p JSON.parse(result)
DELETE /api/v1/PriceDiscounts/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the SKU Discount to be deleted. |
Example responses
200 Response
{"id":12321,"object":"discount","client_identifier":"","percent_discount":25,"discount_level_id":0}
{
"id": 12321,
"object": "discount",
"client_identifier": "",
"percent_discount": 25,
"discount_level_id": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | SKU Discount was successfully deleted. | PriceDiscount |
400 | Bad Request | SKU Discount could not be deleted. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Create a New SKU Discount
Code samples
# You can also use wget
curl -X POST /api/v1/PriceDiscounts/{skuId} \
-H 'Content-Type: application/json' \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePostRequest()
{
string url = "/api/v1/PriceDiscounts/{skuId}";
string json = @"{
""id"": 997,
""client_identifier"": """",
""name"": ""loyalty discount"",
""discount_level_id"": 999,
""percent_discount"": 25
}";
PriceDiscountRequest content = JsonConvert.DeserializeObject(json);
await PostAsync(content, url);
}
/// Performs a POST Request
public async Task PostAsync(PriceDiscountRequest content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute POST request
HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
}
/// Serialize an object to Json
private StringContent SerializeObject(PriceDiscountRequest content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api/v1/PriceDiscounts/{skuId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/api/v1/PriceDiscounts/{skuId}', headers = headers)
print(r.json())
const inputBody = '{
"id": 997,
"client_identifier": "",
"name": "loyalty discount",
"discount_level_id": 999,
"percent_discount": 25
}';
const headers = {
'Content-Type':'application/json',
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/PriceDiscounts/{skuId}',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/api/v1/PriceDiscounts/{skuId}',
params: {
}, headers: headers
p JSON.parse(result)
POST /api/v1/PriceDiscounts/{skuId}
Body parameter
{
"id": 997,
"client_identifier": "",
"name": "loyalty discount",
"discount_level_id": 999,
"percent_discount": 25
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
skuId | path | integer(int64) | true | The Idenfitifier of the SKU the discount is attached to. |
body | body | PriceDiscountRequest | false | The SKU Discount to be created. |
id | body | integer (int64) | false | The ID associated with the Discount. |
client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
name | body | string ¦ null | false | The name of the discount level. |
discount_level_id | body | integer (int64) | false | The ID of the DiscountLevel that the Discount is attached to. |
percent_discount | body | number (double) ¦ null | false | The discount percentage. This must be a value from 0 to 100. |
Example responses
200 Response
{"id":12321,"object":"discount","client_identifier":"","percent_discount":25,"discount_level_id":0}
{
"id": 12321,
"object": "discount",
"client_identifier": "",
"percent_discount": 25,
"discount_level_id": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | SKU Discount was successfully created. | PriceDiscount |
400 | Bad Request | SKU Discount could not be created. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Update a SKU Discount
Code samples
# You can also use wget
curl -X PUT /api/v1/PriceDiscounts/{id}/{skuId} \
-H 'Content-Type: application/json' \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePutRequest()
{
int id = 1;
string url = "/api/v1/PriceDiscounts/{id}/{skuId}";
string json = @"{
""id"": 997,
""client_identifier"": """",
""name"": ""loyalty discount"",
""discount_level_id"": 999,
""percent_discount"": 25
}";
PriceDiscountRequest content = JsonConvert.DeserializeObject(json);
var result = await PutAsync(id, content, url);
}
/// Performs a PUT Request
public async Task PutAsync(int id, PriceDiscountRequest content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute PUT request
HttpResponseMessage response = await Client.PutAsync(url + $"/{id}", jsonContent);
//Return response
return await DeserializeObject(response);
}
/// Serialize an object to Json
private StringContent SerializeObject(PriceDiscountRequest content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','/api/v1/PriceDiscounts/{id}/{skuId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.put('/api/v1/PriceDiscounts/{id}/{skuId}', headers = headers)
print(r.json())
const inputBody = '{
"id": 997,
"client_identifier": "",
"name": "loyalty discount",
"discount_level_id": 999,
"percent_discount": 25
}';
const headers = {
'Content-Type':'application/json',
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/PriceDiscounts/{id}/{skuId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.put '/api/v1/PriceDiscounts/{id}/{skuId}',
params: {
}, headers: headers
p JSON.parse(result)
PUT /api/v1/PriceDiscounts/{id}/{skuId}
Body parameter
{
"id": 997,
"client_identifier": "",
"name": "loyalty discount",
"discount_level_id": 999,
"percent_discount": 25
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the SKU Discount that will be updated. |
skuId | path | integer(int64) | true | none |
body | body | PriceDiscountRequest | false | The SKU Discount to be updated. |
id | body | integer (int64) | false | The ID associated with the Discount. |
client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
name | body | string ¦ null | false | The name of the discount level. |
discount_level_id | body | integer (int64) | false | The ID of the DiscountLevel that the Discount is attached to. |
percent_discount | body | number (double) ¦ null | false | The discount percentage. This must be a value from 0 to 100. |
Example responses
200 Response
{"id":12321,"object":"discount","client_identifier":"","percent_discount":25,"discount_level_id":0}
{
"id": 12321,
"object": "discount",
"client_identifier": "",
"percent_discount": 25,
"discount_level_id": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | SKU Discount was successfully updated. | PriceDiscount |
400 | Bad Request | SKU Discount could not be updated. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Products
Retrieve a List of Products
A maximum of 100 records can be requested at once. If more records are needed, a page can be supplied to get the next set of records. If no IDs are supplied, all available Products (up to the maximum) will be returned.
Code samples
# You can also use wget
curl -X GET /api/v1/Products \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/Products";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/Products', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/Products', headers = headers)
print(r.json())
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Products',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/Products',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/Products
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
CreatedOnMin | query | string(date-time) | false | The minimum created on date for the list of Products. Must be less than or equal to CreatedOnMax . |
CreatedOnMax | query | string(date-time) | false | The maximum created on date for the list of Products. Must be greater than or equal to CreatedOnMin . |
BrandId | query | integer(int64) | false | The response will include only products from this Brand. |
Created | query | string(date-time) | false | A filter on the list based on the object created field. The value can be a |
Ids | query | array[integer] | false | The IDs of the objects that are being requested. |
Page | query | integer(int32) | false | The page of the results. |
Limit | query | integer(int32) | false | A limit on the number of objects to be returned, between 1 and 100. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Detailed descriptions
Created: A filter on the list based on the object created
field. The value can be a
System.DateTime.
Example responses
200 Response
[
{
"id": 4245,
"library_product_id": 4245,
"object": "product",
"client_identifier": "string",
"name": "WX Series Explosion-Proof Gas Catalytic Heater",
"short_name": "WX Series",
"short_description": "WX Series Infrared Gas Catalytic Explosion-Proof Heaters.",
"primary_image": "https://productimage.com/image.png",
"brand_id": 124483,
"brand": {},
"quantity_discount_id": 124483,
"quantity_discount": {},
"created_on": "2019-08-24T14:15:22Z",
"url": "https://domain.com/product/x1D"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Products successfully retrieved. | Inline |
400 | Bad Request | Products could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Response Schema
Status Code 200
Name | Type | Required | Description |
---|---|---|---|
anonymous | [Product] | false | [The Product object contains information about products. An Product will have a name, short name, short description, brand, and sku information.] |
» id | integer (int64) | false | The primary identifier of the Product |
» library_product_id | integer (int64) ¦ null | false | The ID of the Library Product that the product is attached to. |
» object | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
» client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
» name | string ¦ null | false | The name of the product. |
» short_name | string ¦ null | false | The short name of the product. Used when displaying the product in smaller spaces. |
» short_description | string ¦ null | false | A short summary of the product |
» primary_image | string ¦ null | false | The primary image of the product |
» brand_id | integer (int64) ¦ null | false | The ID of the Brand that the product is attached to. |
» brand | Brand | false | The Brand object contains information about brands.A brand is a term, name or design that is associated with a number of sellers, goods or products. A brand represents the identity or personality of a given set of products. Brands may manufacturer and sell their products through their own seller or through multiple sellers. A Brand will have a name, alias, and list of related Product . |
» quantity_discount_id | integer (int64) ¦ null | false | The ID of the QuantityDiscount that the product is attached to. |
» quantity_discount | QuantityDiscount | false | The QuantityDiscount object contains information about quantity discount rules. |
» created_on | string (date-time) | false | When the product was added to your catalog |
» url | string (uri) ¦ null | false | The Url to the product |
Retrieve a Product
Code samples
# You can also use wget
curl -X GET /api/v1/Products/{id} \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/Products/{id}";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/Products/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/Products/{id}', headers = headers)
print(r.json())
const headers = {
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Products/{id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/Products/{id}',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/Products/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the Product being requested. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Example responses
200 Response
{"id":4245,"library_product_id":4245,"object":"product","client_identifier":"string","name":"WX Series Explosion-Proof Gas Catalytic Heater","short_name":"WX Series","short_description":"WX Series Infrared Gas Catalytic Explosion-Proof Heaters.","primary_image":"https://productimage.com/image.png","brand_id":124483,"brand":{"client_identifier":"","name":"Brand Name","alias":"Brand Alias","id":92590,"object":"brand","created_on":"2020-12-01T08:00:00.000Z"},"quantity_discount_id":124483,"quantity_discount":{"client_identifier":"string","id":8,"object":"QuantityDiscount","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","is_active":true,"combine_with_other_products_using_same_discount":true,"apply_to_sale_price":true,"show_percentage_off":true,"show_product_discounts":true,"show_sku_discounts":true,"calculation":"OverrideDiscountLevelPercentDiscount","tiers":[],"discount_levels":[]},"created_on":"2019-08-24T14:15:22Z","url":"https://domain.com/product/x1D"}
{
"id": 4245,
"library_product_id": 4245,
"object": "product",
"client_identifier": "string",
"name": "WX Series Explosion-Proof Gas Catalytic Heater",
"short_name": "WX Series",
"short_description": "WX Series Infrared Gas Catalytic Explosion-Proof Heaters.",
"primary_image": "https://productimage.com/image.png",
"brand_id": 124483,
"brand": {
"client_identifier": "",
"name": "Brand Name",
"alias": "Brand Alias",
"id": 92590,
"object": "brand",
"created_on": "2020-12-01T08:00:00.000Z"
},
"quantity_discount_id": 124483,
"quantity_discount": {
"client_identifier": "string",
"id": 8,
"object": "QuantityDiscount",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"is_active": true,
"combine_with_other_products_using_same_discount": true,
"apply_to_sale_price": true,
"show_percentage_off": true,
"show_product_discounts": true,
"show_sku_discounts": true,
"calculation": "OverrideDiscountLevelPercentDiscount",
"tiers": [],
"discount_levels": []
},
"created_on": "2019-08-24T14:15:22Z",
"url": "https://domain.com/product/x1D"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Product successfully retrieved. | Product |
400 | Bad Request | Product could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Delete a Product
Code samples
# You can also use wget
curl -X DELETE /api/v1/Products/{id} \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeDeleteRequest()
{
int id = 1;
string url = "/api/v1/Products/{id}";
await DeleteAsync(id, url);
}
/// Performs a DELETE Request
public async Task DeleteAsync(int id, string url)
{
//Execute DELETE request
HttpResponseMessage response = await Client.DeleteAsync(url + $"/{id}");
//Return response
await DeserializeObject(response);
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','/api/v1/Products/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.delete('/api/v1/Products/{id}', headers = headers)
print(r.json())
const headers = {
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Products/{id}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.delete '/api/v1/Products/{id}',
params: {
}, headers: headers
p JSON.parse(result)
DELETE /api/v1/Products/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the Product to be deleted. |
Example responses
200 Response
{"id":4245,"library_product_id":4245,"object":"product","client_identifier":"string","name":"WX Series Explosion-Proof Gas Catalytic Heater","short_name":"WX Series","short_description":"WX Series Infrared Gas Catalytic Explosion-Proof Heaters.","primary_image":"https://productimage.com/image.png","brand_id":124483,"brand":{"client_identifier":"","name":"Brand Name","alias":"Brand Alias","id":92590,"object":"brand","created_on":"2020-12-01T08:00:00.000Z"},"quantity_discount_id":124483,"quantity_discount":{"client_identifier":"string","id":8,"object":"QuantityDiscount","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","is_active":true,"combine_with_other_products_using_same_discount":true,"apply_to_sale_price":true,"show_percentage_off":true,"show_product_discounts":true,"show_sku_discounts":true,"calculation":"OverrideDiscountLevelPercentDiscount","tiers":[],"discount_levels":[]},"created_on":"2019-08-24T14:15:22Z","url":"https://domain.com/product/x1D"}
{
"id": 4245,
"library_product_id": 4245,
"object": "product",
"client_identifier": "string",
"name": "WX Series Explosion-Proof Gas Catalytic Heater",
"short_name": "WX Series",
"short_description": "WX Series Infrared Gas Catalytic Explosion-Proof Heaters.",
"primary_image": "https://productimage.com/image.png",
"brand_id": 124483,
"brand": {
"client_identifier": "",
"name": "Brand Name",
"alias": "Brand Alias",
"id": 92590,
"object": "brand",
"created_on": "2020-12-01T08:00:00.000Z"
},
"quantity_discount_id": 124483,
"quantity_discount": {
"client_identifier": "string",
"id": 8,
"object": "QuantityDiscount",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"is_active": true,
"combine_with_other_products_using_same_discount": true,
"apply_to_sale_price": true,
"show_percentage_off": true,
"show_product_discounts": true,
"show_sku_discounts": true,
"calculation": "OverrideDiscountLevelPercentDiscount",
"tiers": [],
"discount_levels": []
},
"created_on": "2019-08-24T14:15:22Z",
"url": "https://domain.com/product/x1D"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Product was successfully deleted. | Product |
400 | Bad Request | Product could not be deleted. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
QuantityDiscounts
Retrieve a List of QuantityDiscounts
A maximum of 100 records can be requested at once. If more records are needed, a page can be supplied to get the next set of records. If no IDs are supplied, all available QuantityDiscounts (up to the maximum) will be returned.
Code samples
# You can also use wget
curl -X GET /api/v1/QuantityDiscounts \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/QuantityDiscounts";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/QuantityDiscounts', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/QuantityDiscounts', headers = headers)
print(r.json())
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/QuantityDiscounts',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/QuantityDiscounts',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/QuantityDiscounts
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Ids | query | array[integer] | false | The IDs of the objects that are being requested. |
Page | query | integer(int32) | false | The page of the results. |
Limit | query | integer(int32) | false | A limit on the number of objects to be returned, between 1 and 100. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Example responses
200 Response
{
"object": "list",
"data": [
{}
],
"has_more": true,
"total_items": 0,
"url": "string",
"count": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | QuantityDiscounts successfully retrieved. | QuantityDiscounts |
400 | Bad Request | QuantityDiscounts could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Create a New QuantityDiscount
Code samples
# You can also use wget
curl -X POST /api/v1/QuantityDiscounts \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePostRequest()
{
string url = "/api/v1/QuantityDiscounts";
string json = @"{
""client_identifier"": ""string"",
""name"": ""Main Office"",
""is_active"": true,
""combine_with_other_products_using_same_discount"": true,
""apply_to_sale_price"": true,
""show_percentage_off"": true,
""show_product_discounts"": true,
""show_sku_discounts"": true,
""calculation"": ""OverrideDiscountLevelPercentDiscount"",
""tiers"": [
{}
],
""discount_levels"": [
{}
]
}";
QuantityDiscountRequest content = JsonConvert.DeserializeObject(json);
await PostAsync(content, url);
}
/// Performs a POST Request
public async Task PostAsync(QuantityDiscountRequest content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute POST request
HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
}
/// Serialize an object to Json
private StringContent SerializeObject(QuantityDiscountRequest content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api/v1/QuantityDiscounts', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/api/v1/QuantityDiscounts', headers = headers)
print(r.json())
const inputBody = '{
"client_identifier": "string",
"name": "Main Office",
"is_active": true,
"combine_with_other_products_using_same_discount": true,
"apply_to_sale_price": true,
"show_percentage_off": true,
"show_product_discounts": true,
"show_sku_discounts": true,
"calculation": "OverrideDiscountLevelPercentDiscount",
"tiers": [
{}
],
"discount_levels": [
{}
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/QuantityDiscounts',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/api/v1/QuantityDiscounts',
params: {
}, headers: headers
p JSON.parse(result)
POST /api/v1/QuantityDiscounts
Body parameter
{
"client_identifier": "string",
"name": "Main Office",
"is_active": true,
"combine_with_other_products_using_same_discount": true,
"apply_to_sale_price": true,
"show_percentage_off": true,
"show_product_discounts": true,
"show_sku_discounts": true,
"calculation": "OverrideDiscountLevelPercentDiscount",
"tiers": [
{}
],
"discount_levels": [
{}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | QuantityDiscountRequest | false | The QuantityDiscount to be created. |
client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
name | body | string ¦ null | false | Gets or sets the name of the quantity discount. |
is_active | body | boolean | false | Gets or sets the is active property of the quantity dicount |
combine_with_other_products_using_same_discount | body | boolean | false | If true, you can combine two or more different SKU's to achieve the quantity for a quantity discount. |
apply_to_sale_price | body | boolean | false | If true, the discount will be applied to the sale price of a SKU. Otherwise, it will use the lower of the Sale Price, or applied discount. |
show_percentage_off | body | boolean | false | Show the percent discount on the inventory list. |
show_product_discounts | body | boolean | false | Show the quantity discount information at the top of the product page. |
show_sku_discounts | body | boolean | false | Show the quantity discount information on each SKU line item. |
calculation | body | string | false | Determine how quantity discounts are calculated when a discount level is also applied. |
tiers | body | [QuantityDiscountTier] ¦ null | false | The line items for the quantity discount when there is no discount level applied. |
» id | body | integer (int64) | false | The primary identifier of the Tier |
» quantity | body | integer (int32) | false | The minimum quantity needed to apply the quantity discount tier. |
» percent_discount | body | number (double) | false | The percent discount to apply for the quantity discount tier. |
discount_levels | body | [QuantityDiscountDiscountLevel] ¦ null | false | The line items for the quantity discount for each discount level. |
» id | body | integer (int64) | false | The primary identifier of the Discount Level |
» name | body | string ¦ null | false | The name of the Discount Level |
» tiers | body | [QuantityDiscountTier] ¦ null | false | Each quantity discount tier associated to the discount level. |
Enumerated Values
Parameter | Value |
---|---|
calculation | OverrideDiscountLevelPercentDiscount |
calculation | CascadePercentDiscount |
calculation | CombinePercentDiscount |
Example responses
201 Response
{
"client_identifier": "string",
"id": 8,
"object": "QuantityDiscount",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"is_active": true,
"combine_with_other_products_using_same_discount": true,
"apply_to_sale_price": true,
"show_percentage_off": true,
"show_product_discounts": true,
"show_sku_discounts": true,
"calculation": "OverrideDiscountLevelPercentDiscount",
"tiers": [
{}
],
"discount_levels": [
{}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | QuantityDiscount was successfully updated. | None |
201 | Created | Created | QuantityDiscount |
400 | Bad Request | QuantityDiscount could not be updated. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Retrieve an QuantityDiscount
Code samples
# You can also use wget
curl -X GET /api/v1/QuantityDiscounts/{id} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/QuantityDiscounts/{id}";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/QuantityDiscounts/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/QuantityDiscounts/{id}', headers = headers)
print(r.json())
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/QuantityDiscounts/{id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/QuantityDiscounts/{id}',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/QuantityDiscounts/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the QuantityDiscount being requested. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Example responses
200 Response
{
"client_identifier": "string",
"id": 8,
"object": "QuantityDiscount",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"is_active": true,
"combine_with_other_products_using_same_discount": true,
"apply_to_sale_price": true,
"show_percentage_off": true,
"show_product_discounts": true,
"show_sku_discounts": true,
"calculation": "OverrideDiscountLevelPercentDiscount",
"tiers": [
{}
],
"discount_levels": [
{}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | QuantityDiscount successfully retrieved. | QuantityDiscount |
400 | Bad Request | QuantityDiscount could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Update an QuantityDiscount
Code samples
# You can also use wget
curl -X PUT /api/v1/QuantityDiscounts/{id} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePutRequest()
{
int id = 1;
string url = "/api/v1/QuantityDiscounts/{id}";
string json = @"{
""client_identifier"": ""string"",
""name"": ""Main Office"",
""is_active"": true,
""combine_with_other_products_using_same_discount"": true,
""apply_to_sale_price"": true,
""show_percentage_off"": true,
""show_product_discounts"": true,
""show_sku_discounts"": true,
""calculation"": ""OverrideDiscountLevelPercentDiscount"",
""tiers"": [
{}
],
""discount_levels"": [
{}
]
}";
QuantityDiscountRequest content = JsonConvert.DeserializeObject(json);
var result = await PutAsync(id, content, url);
}
/// Performs a PUT Request
public async Task PutAsync(int id, QuantityDiscountRequest content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute PUT request
HttpResponseMessage response = await Client.PutAsync(url + $"/{id}", jsonContent);
//Return response
return await DeserializeObject(response);
}
/// Serialize an object to Json
private StringContent SerializeObject(QuantityDiscountRequest content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','/api/v1/QuantityDiscounts/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.put('/api/v1/QuantityDiscounts/{id}', headers = headers)
print(r.json())
const inputBody = '{
"client_identifier": "string",
"name": "Main Office",
"is_active": true,
"combine_with_other_products_using_same_discount": true,
"apply_to_sale_price": true,
"show_percentage_off": true,
"show_product_discounts": true,
"show_sku_discounts": true,
"calculation": "OverrideDiscountLevelPercentDiscount",
"tiers": [
{}
],
"discount_levels": [
{}
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/QuantityDiscounts/{id}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.put '/api/v1/QuantityDiscounts/{id}',
params: {
}, headers: headers
p JSON.parse(result)
PUT /api/v1/QuantityDiscounts/{id}
Body parameter
{
"client_identifier": "string",
"name": "Main Office",
"is_active": true,
"combine_with_other_products_using_same_discount": true,
"apply_to_sale_price": true,
"show_percentage_off": true,
"show_product_discounts": true,
"show_sku_discounts": true,
"calculation": "OverrideDiscountLevelPercentDiscount",
"tiers": [
{}
],
"discount_levels": [
{}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the QuantityDiscount that will be updated. |
body | body | QuantityDiscountRequest | false | The QuantityDiscount to be updated. |
client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
name | body | string ¦ null | false | Gets or sets the name of the quantity discount. |
is_active | body | boolean | false | Gets or sets the is active property of the quantity dicount |
combine_with_other_products_using_same_discount | body | boolean | false | If true, you can combine two or more different SKU's to achieve the quantity for a quantity discount. |
apply_to_sale_price | body | boolean | false | If true, the discount will be applied to the sale price of a SKU. Otherwise, it will use the lower of the Sale Price, or applied discount. |
show_percentage_off | body | boolean | false | Show the percent discount on the inventory list. |
show_product_discounts | body | boolean | false | Show the quantity discount information at the top of the product page. |
show_sku_discounts | body | boolean | false | Show the quantity discount information on each SKU line item. |
calculation | body | string | false | Determine how quantity discounts are calculated when a discount level is also applied. |
tiers | body | [QuantityDiscountTier] ¦ null | false | The line items for the quantity discount when there is no discount level applied. |
» id | body | integer (int64) | false | The primary identifier of the Tier |
» quantity | body | integer (int32) | false | The minimum quantity needed to apply the quantity discount tier. |
» percent_discount | body | number (double) | false | The percent discount to apply for the quantity discount tier. |
discount_levels | body | [QuantityDiscountDiscountLevel] ¦ null | false | The line items for the quantity discount for each discount level. |
» id | body | integer (int64) | false | The primary identifier of the Discount Level |
» name | body | string ¦ null | false | The name of the Discount Level |
» tiers | body | [QuantityDiscountTier] ¦ null | false | Each quantity discount tier associated to the discount level. |
Enumerated Values
Parameter | Value |
---|---|
calculation | OverrideDiscountLevelPercentDiscount |
calculation | CascadePercentDiscount |
calculation | CombinePercentDiscount |
Example responses
200 Response
{
"client_identifier": "string",
"id": 8,
"object": "QuantityDiscount",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"is_active": true,
"combine_with_other_products_using_same_discount": true,
"apply_to_sale_price": true,
"show_percentage_off": true,
"show_product_discounts": true,
"show_sku_discounts": true,
"calculation": "OverrideDiscountLevelPercentDiscount",
"tiers": [
{}
],
"discount_levels": [
{}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | QuantityDiscount was successfully created. | QuantityDiscount |
400 | Bad Request | QuantityDiscount could not be created. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Delete an QuantityDiscount
Code samples
# You can also use wget
curl -X DELETE /api/v1/QuantityDiscounts/{id} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeDeleteRequest()
{
int id = 1;
string url = "/api/v1/QuantityDiscounts/{id}";
await DeleteAsync(id, url);
}
/// Performs a DELETE Request
public async Task DeleteAsync(int id, string url)
{
//Execute DELETE request
HttpResponseMessage response = await Client.DeleteAsync(url + $"/{id}");
//Return response
await DeserializeObject(response);
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','/api/v1/QuantityDiscounts/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.delete('/api/v1/QuantityDiscounts/{id}', headers = headers)
print(r.json())
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/QuantityDiscounts/{id}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.delete '/api/v1/QuantityDiscounts/{id}',
params: {
}, headers: headers
p JSON.parse(result)
DELETE /api/v1/QuantityDiscounts/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the QuantityDiscount to be deleted. |
Example responses
200 Response
{
"client_identifier": "string",
"id": 8,
"object": "QuantityDiscount",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"is_active": true,
"combine_with_other_products_using_same_discount": true,
"apply_to_sale_price": true,
"show_percentage_off": true,
"show_product_discounts": true,
"show_sku_discounts": true,
"calculation": "OverrideDiscountLevelPercentDiscount",
"tiers": [
{}
],
"discount_levels": [
{}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | QuantityDiscount was successfully deleted. | QuantityDiscount |
400 | Bad Request | QuantityDiscount could not be deleted. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
QuoteDocuments
Retrieve a List of Quotes
A maximum of 100 records can be requested at once. If more records are needed, a page can be supplied to get the next set of records. If no IDs are supplied, all available Quotes (up to the maximum) will be returned.
Code samples
# You can also use wget
curl -X GET /api/v1/QuoteDocuments \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/QuoteDocuments";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/QuoteDocuments', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/QuoteDocuments', headers = headers)
print(r.json())
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/QuoteDocuments',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/QuoteDocuments',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/QuoteDocuments
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
CreatedOnMin | query | string(date-time) | false | The minimum created on date for the list of Quotes. Must be less than or equal to CreatedOnMax . |
CreatedOnMax | query | string(date-time) | false | The maximum created on date for the list of Quotes. Must be greater than or equal to CreatedOnMin . |
SinceId | query | integer(int64) | false | The Quote with this ID as well as Quotes created before it will be excluded from the response. |
Ids | query | array[integer] | false | The IDs of the objects that are being requested. |
Page | query | integer(int32) | false | The page of the results. |
Limit | query | integer(int32) | false | A limit on the number of objects to be returned, between 1 and 100. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Example responses
200 Response
{
"object": "list",
"data": [
{}
],
"has_more": true,
"total_items": 0,
"url": "string",
"count": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Quotes successfully retrieved. | QuoteDocuments |
400 | Bad Request | Quotes could not be retrieved. More details about the problem | |
can be found in the errors list in the response. | ValidationProblemDetails | ||
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Retrieve a Quote Document
Code samples
# You can also use wget
curl -X GET /api/v1/QuoteDocuments/{id} \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/QuoteDocuments/{id}";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/QuoteDocuments/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/QuoteDocuments/{id}', headers = headers)
print(r.json())
const headers = {
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/QuoteDocuments/{id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/QuoteDocuments/{id}',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/QuoteDocuments/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the Quote being requested. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Example responses
200 Response
{"id":8,"object":"quote","url":"https://documents.yodify.com/quotes/","file_name":"string"}
{
"id": 8,
"object": "quote",
"url": "https://documents.yodify.com/quotes/",
"file_name": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Quote Document successfully retrieved. | QuoteDocument |
400 | Bad Request | Quote Document could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Delete a Quote Document
Code samples
# You can also use wget
curl -X DELETE /api/v1/QuoteDocuments/{id} \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeDeleteRequest()
{
int id = 1;
string url = "/api/v1/QuoteDocuments/{id}";
await DeleteAsync(id, url);
}
/// Performs a DELETE Request
public async Task DeleteAsync(int id, string url)
{
//Execute DELETE request
HttpResponseMessage response = await Client.DeleteAsync(url + $"/{id}");
//Return response
await DeserializeObject(response);
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','/api/v1/QuoteDocuments/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.delete('/api/v1/QuoteDocuments/{id}', headers = headers)
print(r.json())
const headers = {
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/QuoteDocuments/{id}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.delete '/api/v1/QuoteDocuments/{id}',
params: {
}, headers: headers
p JSON.parse(result)
DELETE /api/v1/QuoteDocuments/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | Primary identifier of the Quote to delete |
Example responses
200 Response
{"id":8,"object":"quote","url":"https://documents.yodify.com/quotes/","file_name":"string"}
{
"id": 8,
"object": "quote",
"url": "https://documents.yodify.com/quotes/",
"file_name": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Quote successfully deleted. | QuoteDocument |
400 | Bad Request | Bad Request | ValidationProblemDetails |
401 | Unauthorized | Unauthorized | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Create a New Quote Document
Code samples
# You can also use wget
curl -X POST /api/v1/QuoteDocuments/{quoteId} \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePostRequest()
{
string url = "/api/v1/QuoteDocuments/{quoteId}";
await PostAsync(null, url);
}
/// Performs a POST Request
public async Task PostAsync(undefined content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute POST request
HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
}
/// Serialize an object to Json
private StringContent SerializeObject(undefined content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'multipart/form-data',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api/v1/QuoteDocuments/{quoteId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'multipart/form-data',
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/api/v1/QuoteDocuments/{quoteId}', headers = headers)
print(r.json())
const inputBody = '{
"quoteDocument": "string"
}';
const headers = {
'Content-Type':'multipart/form-data',
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/QuoteDocuments/{quoteId}',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'multipart/form-data',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/api/v1/QuoteDocuments/{quoteId}',
params: {
}, headers: headers
p JSON.parse(result)
POST /api/v1/QuoteDocuments/{quoteId}
Body parameter
quoteDocument: string
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
quoteId | path | integer(int64) | true | The Quote Id the document will be attached to. |
quoteDocument | body | string (binary) | false | none |
Example responses
200 Response
{"id":8,"object":"quote","url":"https://documents.yodify.com/quotes/","file_name":"string"}
{
"id": 8,
"object": "quote",
"url": "https://documents.yodify.com/quotes/",
"file_name": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Quote Document was successfully created. | QuoteDocument |
400 | Bad Request | Quote Document could not be created. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Update a Quote Document
Code samples
# You can also use wget
curl -X PUT /api/v1/QuoteDocuments/{quoteId}/{id} \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePutRequest()
{
int id = 1;
string url = "/api/v1/QuoteDocuments/{quoteId}/{id}";
string json = @"{
""expand"": [
""string""
],
""document"": {
""position"": 0,
""read_timeout"": 0,
""write_timeout"": 0
},
""file_name"": ""string""
}";
QuoteDocumentUpdateOptions content = JsonConvert.DeserializeObject(json);
var result = await PutAsync(id, content, url);
}
/// Performs a PUT Request
public async Task PutAsync(int id, QuoteDocumentUpdateOptions content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute PUT request
HttpResponseMessage response = await Client.PutAsync(url + $"/{id}", jsonContent);
//Return response
return await DeserializeObject(response);
}
/// Serialize an object to Json
private StringContent SerializeObject(QuoteDocumentUpdateOptions content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'multipart/form-data',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','/api/v1/QuoteDocuments/{quoteId}/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'multipart/form-data',
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.put('/api/v1/QuoteDocuments/{quoteId}/{id}', headers = headers)
print(r.json())
const inputBody = '{
"expand": [
"string"
],
"document": {
"position": 0,
"read_timeout": 0,
"write_timeout": 0
},
"file_name": "string"
}';
const headers = {
'Content-Type':'multipart/form-data',
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/QuoteDocuments/{quoteId}/{id}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'multipart/form-data',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.put '/api/v1/QuoteDocuments/{quoteId}/{id}',
params: {
}, headers: headers
p JSON.parse(result)
PUT /api/v1/QuoteDocuments/{quoteId}/{id}
Body parameter
expand:
- string
document:
position: 0
read_timeout: 0
write_timeout: 0
file_name: string
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
quoteId | path | integer(int64) | true | none |
id | path | integer(int64) | true | The ID of the Quote Document that will be updated. |
body | body | QuoteDocumentUpdateOptions | false | The Quote Document to be updated. |
expand | body | [string] ¦ null | false | Array of strings for child properties to expand. |
document | body | Stream | false | none |
» can_read | body | boolean | false | none |
» can_write | body | boolean | false | none |
» can_seek | body | boolean | false | none |
» can_timeout | body | boolean | false | none |
» length | body | integer (int64) | false | none |
» position | body | integer (int64) | false | none |
» read_timeout | body | integer (int32) | false | none |
» write_timeout | body | integer (int32) | false | none |
file_name | body | string ¦ null | false | none |
Example responses
200 Response
{"id":8,"object":"quote","url":"https://documents.yodify.com/quotes/","file_name":"string"}
{
"id": 8,
"object": "quote",
"url": "https://documents.yodify.com/quotes/",
"file_name": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Quote Document was successfully updated. | QuoteDocument |
400 | Bad Request | Quote Document could not be updated. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Quotes
Retrieve a List of Quotes
A maximum of 100 records can be requested at once. If more records are needed, a page can be supplied to get the next set of records. If no IDs are supplied, all available Quotes (up to the maximum) will be returned.
Code samples
# You can also use wget
curl -X GET /api/v1/Quotes \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/Quotes";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/Quotes', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/Quotes', headers = headers)
print(r.json())
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Quotes',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/Quotes',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/Quotes
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Statuses | query | array[string] | false | Return only Quotes with corresponding statuses. |
CreatedOnMin | query | string(date-time) | false | The minimum created on date for the list of Quotes. Must be less than or equal to CreatedOnMax . |
CreatedOnMax | query | string(date-time) | false | The maximum created on date for the list of Quotes. Must be greater than or equal to CreatedOnMin . |
SinceId | query | integer(int64) | false | The Quote with this ID as well as Quotes created before it will be excluded from the response. |
Ids | query | array[integer] | false | The IDs of the objects that are being requested. |
Page | query | integer(int32) | false | The page of the results. |
Limit | query | integer(int32) | false | A limit on the number of objects to be returned, between 1 and 100. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Enumerated Values
Parameter | Value |
---|---|
Statuses | New |
Statuses | Active |
Statuses | Expired |
Statuses | Cancelled |
Statuses | Complete |
Statuses | Accepted |
Statuses | AcceptedOrdered |
Statuses | QuoteSent |
Statuses | Declined |
Statuses | Draft |
Statuses | Deleted |
Statuses | Closed |
Statuses | CustomerCancelled |
Statuses | AllActive |
Example responses
200 Response
{
"object": "list",
"data": [
{}
],
"has_more": true,
"total_items": 0,
"url": "string",
"count": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Quotes successfully retrieved. | Quotes |
400 | Bad Request | Quotes could not be retrieved. More details about the problem | |
can be found in the errors list in the response. | ValidationProblemDetails | ||
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Create a New Quote
Code samples
# You can also use wget
curl -X POST /api/v1/Quotes \
-H 'Content-Type: application/json' \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePostRequest()
{
string url = "/api/v1/Quotes";
string json = @"{
""client_identifier"": ""string"",
""quote_number"": ""ORD-000009158381-123"",
""customer_id"": ""e49fe4dd-b087-439f-8897-bcfc84b5dacc"",
""customer"": {
""id"": ""e49fe4dd-b087-439f-8897-bcfc84b5dacc"",
""object"": ""customer"",
""first_name"": ""John"",
""last_name"": ""Smit"",
""company_name"": ""Widgets Inc"",
""email_address"": ""john@widgetsinc.com"",
""phone_number"": ""555-123-1234"",
""account_id"": 12,
""account_name"": ""Widgets Inc"",
""account_number"": ""123456"",
""discount_level_id"": 14,
""discount_level_name"": ""PRICELEVEL-1""
},
""items"": [
{}
],
""currency_code"": ""CAD"",
""quote_status"": ""Processing"",
""activation_date"": ""2020-12-01T08:00:00.000Z"",
""sent_to_customer_date"": ""2020-12-01T08:00:00.000Z"",
""customer_reference"": ""Pipeline 2021-10-06"",
""completion_date"": ""2020-12-01T08:00:00.000Z"",
""order_id"": 74,
""expiry_days"": 30,
""expiry_date"": ""2020-12-01T08:00:00.000Z"",
""address"": {
""client_identifier"": ""string"",
""name"": ""Main Office"",
""first_name"": ""string"",
""last_name"": ""string"",
""company_name"": ""string"",
""city"": ""Main Office"",
""state_code"": ""TX"",
""country_code"": ""US"",
""street1"": ""915 W Dallas St"",
""street2"": ""Unit 112"",
""postal_code"": ""77019"",
""phone_number"": ""+1 713-123-1234"",
""is_primary"": true,
""is_warehouse"": true
},
""store_comments"": """",
""customer_comments"": """",
""industry"": """",
""estimated_shipping"": 0
}";
QuoteRequest content = JsonConvert.DeserializeObject(json);
await PostAsync(content, url);
}
/// Performs a POST Request
public async Task PostAsync(QuoteRequest content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute POST request
HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
}
/// Serialize an object to Json
private StringContent SerializeObject(QuoteRequest content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api/v1/Quotes', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/api/v1/Quotes', headers = headers)
print(r.json())
const inputBody = '{
"client_identifier": "string",
"quote_number": "ORD-000009158381-123",
"customer_id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"customer": {
"id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"object": "customer",
"first_name": "John",
"last_name": "Smit",
"company_name": "Widgets Inc",
"email_address": "john@widgetsinc.com",
"phone_number": "555-123-1234",
"account_id": 12,
"account_name": "Widgets Inc",
"account_number": "123456",
"discount_level_id": 14,
"discount_level_name": "PRICELEVEL-1"
},
"items": [
{}
],
"currency_code": "CAD",
"quote_status": "Processing",
"activation_date": "2020-12-01T08:00:00.000Z",
"sent_to_customer_date": "2020-12-01T08:00:00.000Z",
"customer_reference": "Pipeline 2021-10-06",
"completion_date": "2020-12-01T08:00:00.000Z",
"order_id": 74,
"expiry_days": 30,
"expiry_date": "2020-12-01T08:00:00.000Z",
"address": {
"client_identifier": "string",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"store_comments": "",
"customer_comments": "",
"industry": "",
"estimated_shipping": 0
}';
const headers = {
'Content-Type':'application/json',
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Quotes',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/api/v1/Quotes',
params: {
}, headers: headers
p JSON.parse(result)
POST /api/v1/Quotes
Body parameter
{
"client_identifier": "string",
"quote_number": "ORD-000009158381-123",
"customer_id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"customer": {
"id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"object": "customer",
"first_name": "John",
"last_name": "Smit",
"company_name": "Widgets Inc",
"email_address": "john@widgetsinc.com",
"phone_number": "555-123-1234",
"account_id": 12,
"account_name": "Widgets Inc",
"account_number": "123456",
"discount_level_id": 14,
"discount_level_name": "PRICELEVEL-1"
},
"items": [
{}
],
"currency_code": "CAD",
"quote_status": "Processing",
"activation_date": "2020-12-01T08:00:00.000Z",
"sent_to_customer_date": "2020-12-01T08:00:00.000Z",
"customer_reference": "Pipeline 2021-10-06",
"completion_date": "2020-12-01T08:00:00.000Z",
"order_id": 74,
"expiry_days": 30,
"expiry_date": "2020-12-01T08:00:00.000Z",
"address": {
"client_identifier": "string",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"store_comments": "",
"customer_comments": "",
"industry": "",
"estimated_shipping": 0
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | QuoteRequest | false | The Quote to be created. |
client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
quote_number | body | string ¦ null | false | A unique identifier for the quote |
customer_id | body | string ¦ null | false | The primary identifier for the customer |
customer | body | Customer | false | none |
» id | body | string ¦ null | false | Unique identifier for the object. |
» object | body | string ¦ null | false | String representing the object’s type. Objects of the same type share the same value. |
» first_name | body | string ¦ null | false | The first name of the customer. |
» last_name | body | string ¦ null | false | The last name of the customer. |
» company_name | body | string ¦ null | false | The company name of the customer. |
» email_address | body | string ¦ null | false | The email address of the customer, if provided. |
» phone_number | body | string ¦ null | false | The phone number of the customer, if provided. |
» account_id | body | integer (int64) ¦ null | false | The account associated with the customer. |
» account_name | body | string ¦ null | false | The account name associated with the customer. |
» account_number | body | string ¦ null | false | The account number associated with the customer. |
» discount_level_id | body | integer (int64) ¦ null | false | The discount level associated with the customer. |
» discount_level_name | body | string ¦ null | false | The discount level name associated with the customer. |
items | body | [QuoteItemRequest] ¦ null | false | A list of line item objects, each containing information about an item in the quote. |
» id | body | integer (int64) ¦ null | false | Primary identifier for the line item, null if it is a new quote item. |
» client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
» sku_id | body | integer (int64) ¦ null | false | The ID of the SKU that the Quote Item is attached to. |
» product_id | body | integer (int64) | false | The ID of the Product that the Quote Item is attached to. |
» quantity | body | integer (int32) | false | The number of items that were purchased. |
» model_number | body | string ¦ null | false | The item's MPN (Manufacturer's Part Number). |
» price_per_unit | body | number (double) | false | Customer's Price of each item |
» seller_price_per_unit | body | number (double) | false | Sellers's Price of each item |
» add_ons | body | [QuoteItemAddOnRequest] ¦ null | false | A list of add-ons that are attached to the quote items |
» optional | body | boolean | false | Whether or not the item can be removed by the customer during checkout |
» minimum_quantity | body | integer (int32) ¦ null | false | The minimum number of items that the customer must purchase |
» maximum_quantity | body | integer (int32) ¦ null | false | The maximum number of items that the customer can purchase |
» store_comments | body | string ¦ null | false | Any comments supplied by the store |
» customer_comments | body | string ¦ null | false | Any comments supplied by the customer |
» lead_time_from | body | integer (int32) ¦ null | false | The minimum number of days it will take to ship the item |
» lead_time_to | body | integer (int32) ¦ null | false | The maximum number of days it will take to ship the item |
» options | body | [QuoteItemOption] ¦ null | false | The selected configurator options for the item |
» type | body | integer (int32) | false | The product type for the item. 1 is a library product. 2 is an exclusive product |
currency_code | body | string ¦ null | false | The three letter code (ISO 4217) for the currency used for the payment. |
quote_status | body | string | false | Quote statuses are limited to the following pre-defined values: |
activation_date | body | string (date-time) ¦ null | false | The UTC date the quote was sent to the seller on. |
sent_to_customer_date | body | string (date-time) ¦ null | false | The UTC date the quote was sent to the customer on. |
customer_reference | body | string ¦ null | false | The primary identifier supplied by the customer |
completion_date | body | string (date-time) ¦ null | false | The UTC date the quote was purchased on. |
order_id | body | integer (int64) ¦ null | false | The primary identifier of the order |
expiry_days | body | integer (int32) ¦ null | false | The number of days, the quote is active for |
expiry_date | body | string (date-time) ¦ null | false | The UTC date the quote can no longer be purchased on. |
address | body | AddressRequest | false | The request object used to create or update an Address. |
» client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
» name | body | string ¦ null | false | Gets or sets the name of the address. |
» first_name | body | string ¦ null | false | The first name of the address contact. |
» last_name | body | string ¦ null | false | The last name of the address contact. |
» company_name | body | string ¦ null | false | The company name of the address contact. |
» city | body | string ¦ null | false | Gets or sets the city. |
» state_code | body | string ¦ null | false | Gets or sets the two-letter abbreviation of the state or province. |
» country_code | body | string ¦ null | false | Gets or sets the two-letter code (ISO 3166-1 alpha-2 two-letter country code) for the country |
» street1 | body | string ¦ null | false | Gets or sets the street address |
» street2 | body | string ¦ null | false | Optional field for additional information for the street address |
» postal_code | body | string ¦ null | false | The zip or postal code |
» phone_number | body | string ¦ null | false | The phone number |
» is_primary | body | boolean | false | Is this your main address. Not updateable |
» is_warehouse | body | boolean | false | Is this address only a warehouse? Will not show up on contact pages when true. |
store_comments | body | string ¦ null | false | Any comments supplied by the store |
customer_comments | body | string ¦ null | false | Any comments supplied by the customer |
industry | body | string ¦ null | false | Industry the customer belongs to |
estimated_shipping | body | number (double) ¦ null | false | How much shipping will likely charge |
Detailed descriptions
quote_status: Quote statuses are limited to the following pre-defined values:
- New - Customer has not activated quote.
- Active - Customer sent quote to seller.
- Expired - Customer did not purchase order in time.
- Cancelled - Customer or seller cancelled quote.
- Complete - Quote has been purchased, and has been shipped.
- Accepted - Customer accepted quote but hasn't purchased.
- AcceptedOrdered - Quote has purchased the quote, but the order has not shipped.
- ProposalSent - Quote has been reviewed by the seller, and sent to the customer.
- Declined - Customer or seller declined the quote.
- Draft - Customer or seller has not submitted the quote.
address: The request object used to create or update an Address.
The Address
object contains information about a place, or location.
Examples are - Offices - Warehouses - Shipping Addresses - Billing Addresses
Enumerated Values
Parameter | Value |
---|---|
quote_status | New |
quote_status | Active |
quote_status | Expired |
quote_status | Cancelled |
quote_status | Complete |
quote_status | Accepted |
quote_status | AcceptedOrdered |
quote_status | QuoteSent |
quote_status | Declined |
quote_status | Draft |
quote_status | Deleted |
quote_status | Closed |
quote_status | CustomerCancelled |
quote_status | AllActive |
Example responses
200 Response
{"id":8,"object":"quote","client_identifier":"string","quote_number":"ORD-000009158381-123","customer_id":"e49fe4dd-b087-439f-8897-bcfc84b5dacc","customer":{"id":"e49fe4dd-b087-439f-8897-bcfc84b5dacc","object":"customer","first_name":"John","last_name":"Smit","company_name":"Widgets Inc","email_address":"john@widgetsinc.com","phone_number":"555-123-1234","account_id":12,"account_name":"Widgets Inc","account_number":"123456","discount_level_id":14,"discount_level_name":"PRICELEVEL-1"},"items":[{}],"currency_code":"CAD","seller_currency_code":"USD","quote_status":"Processing","activation_date":"2020-12-01T08:00:00.000Z","sent_to_customer_date":"2020-12-01T08:00:00.000Z","customer_reference":"Pipeline 2021-10-06","completion_date":"2020-12-01T08:00:00.000Z","order_id":74,"expiry_days":30,"expiry_date":"2020-12-01T08:00:00.000Z","address":{"client_identifier":"string","id":8,"object":"address","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","first_name":"string","last_name":"string","company_name":"string","city":"Main Office","state_code":"TX","country_code":"US","street1":"915 W Dallas St","street2":"Unit 112","postal_code":"77019","phone_number":"+1 713-123-1234","is_primary":true,"is_warehouse":true},"store_comments":"","customer_comments":"","documents":[{}],"url":"https://domain.com/quote/x1D","attachment_url":"string"}
{
"id": 8,
"object": "quote",
"client_identifier": "string",
"quote_number": "ORD-000009158381-123",
"customer_id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"customer": {
"id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"object": "customer",
"first_name": "John",
"last_name": "Smit",
"company_name": "Widgets Inc",
"email_address": "john@widgetsinc.com",
"phone_number": "555-123-1234",
"account_id": 12,
"account_name": "Widgets Inc",
"account_number": "123456",
"discount_level_id": 14,
"discount_level_name": "PRICELEVEL-1"
},
"items": [
{}
],
"currency_code": "CAD",
"seller_currency_code": "USD",
"quote_status": "Processing",
"activation_date": "2020-12-01T08:00:00.000Z",
"sent_to_customer_date": "2020-12-01T08:00:00.000Z",
"customer_reference": "Pipeline 2021-10-06",
"completion_date": "2020-12-01T08:00:00.000Z",
"order_id": 74,
"expiry_days": 30,
"expiry_date": "2020-12-01T08:00:00.000Z",
"address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"store_comments": "",
"customer_comments": "",
"documents": [
{}
],
"url": "https://domain.com/quote/x1D",
"attachment_url": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Quote was successfully created. | Quote |
400 | Bad Request | Quote could not be created. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Retrieve an Quote
Code samples
# You can also use wget
curl -X GET /api/v1/Quotes/{id} \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/Quotes/{id}";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/Quotes/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/Quotes/{id}', headers = headers)
print(r.json())
const headers = {
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Quotes/{id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/Quotes/{id}',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/Quotes/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the Quote being requested. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Example responses
200 Response
{"id":8,"object":"quote","client_identifier":"string","quote_number":"ORD-000009158381-123","customer_id":"e49fe4dd-b087-439f-8897-bcfc84b5dacc","customer":{"id":"e49fe4dd-b087-439f-8897-bcfc84b5dacc","object":"customer","first_name":"John","last_name":"Smit","company_name":"Widgets Inc","email_address":"john@widgetsinc.com","phone_number":"555-123-1234","account_id":12,"account_name":"Widgets Inc","account_number":"123456","discount_level_id":14,"discount_level_name":"PRICELEVEL-1"},"items":[{}],"currency_code":"CAD","seller_currency_code":"USD","quote_status":"Processing","activation_date":"2020-12-01T08:00:00.000Z","sent_to_customer_date":"2020-12-01T08:00:00.000Z","customer_reference":"Pipeline 2021-10-06","completion_date":"2020-12-01T08:00:00.000Z","order_id":74,"expiry_days":30,"expiry_date":"2020-12-01T08:00:00.000Z","address":{"client_identifier":"string","id":8,"object":"address","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","first_name":"string","last_name":"string","company_name":"string","city":"Main Office","state_code":"TX","country_code":"US","street1":"915 W Dallas St","street2":"Unit 112","postal_code":"77019","phone_number":"+1 713-123-1234","is_primary":true,"is_warehouse":true},"store_comments":"","customer_comments":"","documents":[{}],"url":"https://domain.com/quote/x1D","attachment_url":"string"}
{
"id": 8,
"object": "quote",
"client_identifier": "string",
"quote_number": "ORD-000009158381-123",
"customer_id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"customer": {
"id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"object": "customer",
"first_name": "John",
"last_name": "Smit",
"company_name": "Widgets Inc",
"email_address": "john@widgetsinc.com",
"phone_number": "555-123-1234",
"account_id": 12,
"account_name": "Widgets Inc",
"account_number": "123456",
"discount_level_id": 14,
"discount_level_name": "PRICELEVEL-1"
},
"items": [
{}
],
"currency_code": "CAD",
"seller_currency_code": "USD",
"quote_status": "Processing",
"activation_date": "2020-12-01T08:00:00.000Z",
"sent_to_customer_date": "2020-12-01T08:00:00.000Z",
"customer_reference": "Pipeline 2021-10-06",
"completion_date": "2020-12-01T08:00:00.000Z",
"order_id": 74,
"expiry_days": 30,
"expiry_date": "2020-12-01T08:00:00.000Z",
"address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"store_comments": "",
"customer_comments": "",
"documents": [
{}
],
"url": "https://domain.com/quote/x1D",
"attachment_url": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Quote successfully retrieved. | Quote |
400 | Bad Request | Quote could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Update a Quote
Code samples
# You can also use wget
curl -X PUT /api/v1/Quotes/{id} \
-H 'Content-Type: application/json' \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePutRequest()
{
int id = 1;
string url = "/api/v1/Quotes/{id}";
string json = @"{
""client_identifier"": ""string"",
""quote_number"": ""ORD-000009158381-123"",
""customer_id"": ""e49fe4dd-b087-439f-8897-bcfc84b5dacc"",
""customer"": {
""id"": ""e49fe4dd-b087-439f-8897-bcfc84b5dacc"",
""object"": ""customer"",
""first_name"": ""John"",
""last_name"": ""Smit"",
""company_name"": ""Widgets Inc"",
""email_address"": ""john@widgetsinc.com"",
""phone_number"": ""555-123-1234"",
""account_id"": 12,
""account_name"": ""Widgets Inc"",
""account_number"": ""123456"",
""discount_level_id"": 14,
""discount_level_name"": ""PRICELEVEL-1""
},
""items"": [
{}
],
""currency_code"": ""CAD"",
""quote_status"": ""Processing"",
""activation_date"": ""2020-12-01T08:00:00.000Z"",
""sent_to_customer_date"": ""2020-12-01T08:00:00.000Z"",
""customer_reference"": ""Pipeline 2021-10-06"",
""completion_date"": ""2020-12-01T08:00:00.000Z"",
""order_id"": 74,
""expiry_days"": 30,
""expiry_date"": ""2020-12-01T08:00:00.000Z"",
""address"": {
""client_identifier"": ""string"",
""name"": ""Main Office"",
""first_name"": ""string"",
""last_name"": ""string"",
""company_name"": ""string"",
""city"": ""Main Office"",
""state_code"": ""TX"",
""country_code"": ""US"",
""street1"": ""915 W Dallas St"",
""street2"": ""Unit 112"",
""postal_code"": ""77019"",
""phone_number"": ""+1 713-123-1234"",
""is_primary"": true,
""is_warehouse"": true
},
""store_comments"": """",
""customer_comments"": """",
""industry"": """",
""estimated_shipping"": 0
}";
QuoteRequest content = JsonConvert.DeserializeObject(json);
var result = await PutAsync(id, content, url);
}
/// Performs a PUT Request
public async Task PutAsync(int id, QuoteRequest content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute PUT request
HttpResponseMessage response = await Client.PutAsync(url + $"/{id}", jsonContent);
//Return response
return await DeserializeObject(response);
}
/// Serialize an object to Json
private StringContent SerializeObject(QuoteRequest content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','/api/v1/Quotes/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.put('/api/v1/Quotes/{id}', headers = headers)
print(r.json())
const inputBody = '{
"client_identifier": "string",
"quote_number": "ORD-000009158381-123",
"customer_id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"customer": {
"id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"object": "customer",
"first_name": "John",
"last_name": "Smit",
"company_name": "Widgets Inc",
"email_address": "john@widgetsinc.com",
"phone_number": "555-123-1234",
"account_id": 12,
"account_name": "Widgets Inc",
"account_number": "123456",
"discount_level_id": 14,
"discount_level_name": "PRICELEVEL-1"
},
"items": [
{}
],
"currency_code": "CAD",
"quote_status": "Processing",
"activation_date": "2020-12-01T08:00:00.000Z",
"sent_to_customer_date": "2020-12-01T08:00:00.000Z",
"customer_reference": "Pipeline 2021-10-06",
"completion_date": "2020-12-01T08:00:00.000Z",
"order_id": 74,
"expiry_days": 30,
"expiry_date": "2020-12-01T08:00:00.000Z",
"address": {
"client_identifier": "string",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"store_comments": "",
"customer_comments": "",
"industry": "",
"estimated_shipping": 0
}';
const headers = {
'Content-Type':'application/json',
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Quotes/{id}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.put '/api/v1/Quotes/{id}',
params: {
}, headers: headers
p JSON.parse(result)
PUT /api/v1/Quotes/{id}
Body parameter
{
"client_identifier": "string",
"quote_number": "ORD-000009158381-123",
"customer_id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"customer": {
"id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"object": "customer",
"first_name": "John",
"last_name": "Smit",
"company_name": "Widgets Inc",
"email_address": "john@widgetsinc.com",
"phone_number": "555-123-1234",
"account_id": 12,
"account_name": "Widgets Inc",
"account_number": "123456",
"discount_level_id": 14,
"discount_level_name": "PRICELEVEL-1"
},
"items": [
{}
],
"currency_code": "CAD",
"quote_status": "Processing",
"activation_date": "2020-12-01T08:00:00.000Z",
"sent_to_customer_date": "2020-12-01T08:00:00.000Z",
"customer_reference": "Pipeline 2021-10-06",
"completion_date": "2020-12-01T08:00:00.000Z",
"order_id": 74,
"expiry_days": 30,
"expiry_date": "2020-12-01T08:00:00.000Z",
"address": {
"client_identifier": "string",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"store_comments": "",
"customer_comments": "",
"industry": "",
"estimated_shipping": 0
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the Quote that will be updated. |
body | body | QuoteRequest | false | The Quote to be updated. |
client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
quote_number | body | string ¦ null | false | A unique identifier for the quote |
customer_id | body | string ¦ null | false | The primary identifier for the customer |
customer | body | Customer | false | none |
» id | body | string ¦ null | false | Unique identifier for the object. |
» object | body | string ¦ null | false | String representing the object’s type. Objects of the same type share the same value. |
» first_name | body | string ¦ null | false | The first name of the customer. |
» last_name | body | string ¦ null | false | The last name of the customer. |
» company_name | body | string ¦ null | false | The company name of the customer. |
» email_address | body | string ¦ null | false | The email address of the customer, if provided. |
» phone_number | body | string ¦ null | false | The phone number of the customer, if provided. |
» account_id | body | integer (int64) ¦ null | false | The account associated with the customer. |
» account_name | body | string ¦ null | false | The account name associated with the customer. |
» account_number | body | string ¦ null | false | The account number associated with the customer. |
» discount_level_id | body | integer (int64) ¦ null | false | The discount level associated with the customer. |
» discount_level_name | body | string ¦ null | false | The discount level name associated with the customer. |
items | body | [QuoteItemRequest] ¦ null | false | A list of line item objects, each containing information about an item in the quote. |
» id | body | integer (int64) ¦ null | false | Primary identifier for the line item, null if it is a new quote item. |
» client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
» sku_id | body | integer (int64) ¦ null | false | The ID of the SKU that the Quote Item is attached to. |
» product_id | body | integer (int64) | false | The ID of the Product that the Quote Item is attached to. |
» quantity | body | integer (int32) | false | The number of items that were purchased. |
» model_number | body | string ¦ null | false | The item's MPN (Manufacturer's Part Number). |
» price_per_unit | body | number (double) | false | Customer's Price of each item |
» seller_price_per_unit | body | number (double) | false | Sellers's Price of each item |
» add_ons | body | [QuoteItemAddOnRequest] ¦ null | false | A list of add-ons that are attached to the quote items |
» optional | body | boolean | false | Whether or not the item can be removed by the customer during checkout |
» minimum_quantity | body | integer (int32) ¦ null | false | The minimum number of items that the customer must purchase |
» maximum_quantity | body | integer (int32) ¦ null | false | The maximum number of items that the customer can purchase |
» store_comments | body | string ¦ null | false | Any comments supplied by the store |
» customer_comments | body | string ¦ null | false | Any comments supplied by the customer |
» lead_time_from | body | integer (int32) ¦ null | false | The minimum number of days it will take to ship the item |
» lead_time_to | body | integer (int32) ¦ null | false | The maximum number of days it will take to ship the item |
» options | body | [QuoteItemOption] ¦ null | false | The selected configurator options for the item |
» type | body | integer (int32) | false | The product type for the item. 1 is a library product. 2 is an exclusive product |
currency_code | body | string ¦ null | false | The three letter code (ISO 4217) for the currency used for the payment. |
quote_status | body | string | false | Quote statuses are limited to the following pre-defined values: |
activation_date | body | string (date-time) ¦ null | false | The UTC date the quote was sent to the seller on. |
sent_to_customer_date | body | string (date-time) ¦ null | false | The UTC date the quote was sent to the customer on. |
customer_reference | body | string ¦ null | false | The primary identifier supplied by the customer |
completion_date | body | string (date-time) ¦ null | false | The UTC date the quote was purchased on. |
order_id | body | integer (int64) ¦ null | false | The primary identifier of the order |
expiry_days | body | integer (int32) ¦ null | false | The number of days, the quote is active for |
expiry_date | body | string (date-time) ¦ null | false | The UTC date the quote can no longer be purchased on. |
address | body | AddressRequest | false | The request object used to create or update an Address. |
» client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
» name | body | string ¦ null | false | Gets or sets the name of the address. |
» first_name | body | string ¦ null | false | The first name of the address contact. |
» last_name | body | string ¦ null | false | The last name of the address contact. |
» company_name | body | string ¦ null | false | The company name of the address contact. |
» city | body | string ¦ null | false | Gets or sets the city. |
» state_code | body | string ¦ null | false | Gets or sets the two-letter abbreviation of the state or province. |
» country_code | body | string ¦ null | false | Gets or sets the two-letter code (ISO 3166-1 alpha-2 two-letter country code) for the country |
» street1 | body | string ¦ null | false | Gets or sets the street address |
» street2 | body | string ¦ null | false | Optional field for additional information for the street address |
» postal_code | body | string ¦ null | false | The zip or postal code |
» phone_number | body | string ¦ null | false | The phone number |
» is_primary | body | boolean | false | Is this your main address. Not updateable |
» is_warehouse | body | boolean | false | Is this address only a warehouse? Will not show up on contact pages when true. |
store_comments | body | string ¦ null | false | Any comments supplied by the store |
customer_comments | body | string ¦ null | false | Any comments supplied by the customer |
industry | body | string ¦ null | false | Industry the customer belongs to |
estimated_shipping | body | number (double) ¦ null | false | How much shipping will likely charge |
Detailed descriptions
quote_status: Quote statuses are limited to the following pre-defined values:
- New - Customer has not activated quote.
- Active - Customer sent quote to seller.
- Expired - Customer did not purchase order in time.
- Cancelled - Customer or seller cancelled quote.
- Complete - Quote has been purchased, and has been shipped.
- Accepted - Customer accepted quote but hasn't purchased.
- AcceptedOrdered - Quote has purchased the quote, but the order has not shipped.
- ProposalSent - Quote has been reviewed by the seller, and sent to the customer.
- Declined - Customer or seller declined the quote.
- Draft - Customer or seller has not submitted the quote.
address: The request object used to create or update an Address.
The Address
object contains information about a place, or location.
Examples are - Offices - Warehouses - Shipping Addresses - Billing Addresses
Enumerated Values
Parameter | Value |
---|---|
quote_status | New |
quote_status | Active |
quote_status | Expired |
quote_status | Cancelled |
quote_status | Complete |
quote_status | Accepted |
quote_status | AcceptedOrdered |
quote_status | QuoteSent |
quote_status | Declined |
quote_status | Draft |
quote_status | Deleted |
quote_status | Closed |
quote_status | CustomerCancelled |
quote_status | AllActive |
Example responses
200 Response
{"id":8,"object":"quote","client_identifier":"string","quote_number":"ORD-000009158381-123","customer_id":"e49fe4dd-b087-439f-8897-bcfc84b5dacc","customer":{"id":"e49fe4dd-b087-439f-8897-bcfc84b5dacc","object":"customer","first_name":"John","last_name":"Smit","company_name":"Widgets Inc","email_address":"john@widgetsinc.com","phone_number":"555-123-1234","account_id":12,"account_name":"Widgets Inc","account_number":"123456","discount_level_id":14,"discount_level_name":"PRICELEVEL-1"},"items":[{}],"currency_code":"CAD","seller_currency_code":"USD","quote_status":"Processing","activation_date":"2020-12-01T08:00:00.000Z","sent_to_customer_date":"2020-12-01T08:00:00.000Z","customer_reference":"Pipeline 2021-10-06","completion_date":"2020-12-01T08:00:00.000Z","order_id":74,"expiry_days":30,"expiry_date":"2020-12-01T08:00:00.000Z","address":{"client_identifier":"string","id":8,"object":"address","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","first_name":"string","last_name":"string","company_name":"string","city":"Main Office","state_code":"TX","country_code":"US","street1":"915 W Dallas St","street2":"Unit 112","postal_code":"77019","phone_number":"+1 713-123-1234","is_primary":true,"is_warehouse":true},"store_comments":"","customer_comments":"","documents":[{}],"url":"https://domain.com/quote/x1D","attachment_url":"string"}
{
"id": 8,
"object": "quote",
"client_identifier": "string",
"quote_number": "ORD-000009158381-123",
"customer_id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"customer": {
"id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"object": "customer",
"first_name": "John",
"last_name": "Smit",
"company_name": "Widgets Inc",
"email_address": "john@widgetsinc.com",
"phone_number": "555-123-1234",
"account_id": 12,
"account_name": "Widgets Inc",
"account_number": "123456",
"discount_level_id": 14,
"discount_level_name": "PRICELEVEL-1"
},
"items": [
{}
],
"currency_code": "CAD",
"seller_currency_code": "USD",
"quote_status": "Processing",
"activation_date": "2020-12-01T08:00:00.000Z",
"sent_to_customer_date": "2020-12-01T08:00:00.000Z",
"customer_reference": "Pipeline 2021-10-06",
"completion_date": "2020-12-01T08:00:00.000Z",
"order_id": 74,
"expiry_days": 30,
"expiry_date": "2020-12-01T08:00:00.000Z",
"address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"store_comments": "",
"customer_comments": "",
"documents": [
{}
],
"url": "https://domain.com/quote/x1D",
"attachment_url": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Quote was successfully updated. | Quote |
400 | Bad Request | Quote could not be updated. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Delete a Quote
Code samples
# You can also use wget
curl -X DELETE /api/v1/Quotes/{id} \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeDeleteRequest()
{
int id = 1;
string url = "/api/v1/Quotes/{id}";
await DeleteAsync(id, url);
}
/// Performs a DELETE Request
public async Task DeleteAsync(int id, string url)
{
//Execute DELETE request
HttpResponseMessage response = await Client.DeleteAsync(url + $"/{id}");
//Return response
await DeserializeObject(response);
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','/api/v1/Quotes/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.delete('/api/v1/Quotes/{id}', headers = headers)
print(r.json())
const headers = {
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Quotes/{id}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.delete '/api/v1/Quotes/{id}',
params: {
}, headers: headers
p JSON.parse(result)
DELETE /api/v1/Quotes/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | Primary identifier of the Quote to delete |
Example responses
200 Response
{"id":8,"object":"quote","client_identifier":"string","quote_number":"ORD-000009158381-123","customer_id":"e49fe4dd-b087-439f-8897-bcfc84b5dacc","customer":{"id":"e49fe4dd-b087-439f-8897-bcfc84b5dacc","object":"customer","first_name":"John","last_name":"Smit","company_name":"Widgets Inc","email_address":"john@widgetsinc.com","phone_number":"555-123-1234","account_id":12,"account_name":"Widgets Inc","account_number":"123456","discount_level_id":14,"discount_level_name":"PRICELEVEL-1"},"items":[{}],"currency_code":"CAD","seller_currency_code":"USD","quote_status":"Processing","activation_date":"2020-12-01T08:00:00.000Z","sent_to_customer_date":"2020-12-01T08:00:00.000Z","customer_reference":"Pipeline 2021-10-06","completion_date":"2020-12-01T08:00:00.000Z","order_id":74,"expiry_days":30,"expiry_date":"2020-12-01T08:00:00.000Z","address":{"client_identifier":"string","id":8,"object":"address","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","first_name":"string","last_name":"string","company_name":"string","city":"Main Office","state_code":"TX","country_code":"US","street1":"915 W Dallas St","street2":"Unit 112","postal_code":"77019","phone_number":"+1 713-123-1234","is_primary":true,"is_warehouse":true},"store_comments":"","customer_comments":"","documents":[{}],"url":"https://domain.com/quote/x1D","attachment_url":"string"}
{
"id": 8,
"object": "quote",
"client_identifier": "string",
"quote_number": "ORD-000009158381-123",
"customer_id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"customer": {
"id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"object": "customer",
"first_name": "John",
"last_name": "Smit",
"company_name": "Widgets Inc",
"email_address": "john@widgetsinc.com",
"phone_number": "555-123-1234",
"account_id": 12,
"account_name": "Widgets Inc",
"account_number": "123456",
"discount_level_id": 14,
"discount_level_name": "PRICELEVEL-1"
},
"items": [
{}
],
"currency_code": "CAD",
"seller_currency_code": "USD",
"quote_status": "Processing",
"activation_date": "2020-12-01T08:00:00.000Z",
"sent_to_customer_date": "2020-12-01T08:00:00.000Z",
"customer_reference": "Pipeline 2021-10-06",
"completion_date": "2020-12-01T08:00:00.000Z",
"order_id": 74,
"expiry_days": 30,
"expiry_date": "2020-12-01T08:00:00.000Z",
"address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"store_comments": "",
"customer_comments": "",
"documents": [
{}
],
"url": "https://domain.com/quote/x1D",
"attachment_url": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Quote successfully deleted. | Quote |
400 | Bad Request | Bad Request | ValidationProblemDetails |
401 | Unauthorized | Unauthorized | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Cancel a Quote
Code samples
# You can also use wget
curl -X PUT /api/v1/Quotes/cancel/{id} \
-H 'Content-Type: application/json' \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePutRequest()
{
int id = 1;
string url = "/api/v1/Quotes/cancel/{id}";
string json = @"{
""expand"": [
""string""
],
""message"": ""string""
}";
QuoteCancelOptions content = JsonConvert.DeserializeObject(json);
var result = await PutAsync(id, content, url);
}
/// Performs a PUT Request
public async Task PutAsync(int id, QuoteCancelOptions content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute PUT request
HttpResponseMessage response = await Client.PutAsync(url + $"/{id}", jsonContent);
//Return response
return await DeserializeObject(response);
}
/// Serialize an object to Json
private StringContent SerializeObject(QuoteCancelOptions content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','/api/v1/Quotes/cancel/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.put('/api/v1/Quotes/cancel/{id}', headers = headers)
print(r.json())
const inputBody = '{
"expand": [
"string"
],
"message": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Quotes/cancel/{id}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.put '/api/v1/Quotes/cancel/{id}',
params: {
}, headers: headers
p JSON.parse(result)
PUT /api/v1/Quotes/cancel/{id}
Body parameter
{
"expand": [
"string"
],
"message": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the Quote that will be updated. |
body | body | QuoteCancelOptions | false | The message sent to the customer when cancelling an Quote. |
expand | body | [string] ¦ null | false | Array of strings for child properties to expand. |
message | body | string ¦ null | false | none |
Example responses
200 Response
{"id":8,"object":"quote","client_identifier":"string","quote_number":"ORD-000009158381-123","customer_id":"e49fe4dd-b087-439f-8897-bcfc84b5dacc","customer":{"id":"e49fe4dd-b087-439f-8897-bcfc84b5dacc","object":"customer","first_name":"John","last_name":"Smit","company_name":"Widgets Inc","email_address":"john@widgetsinc.com","phone_number":"555-123-1234","account_id":12,"account_name":"Widgets Inc","account_number":"123456","discount_level_id":14,"discount_level_name":"PRICELEVEL-1"},"items":[{}],"currency_code":"CAD","seller_currency_code":"USD","quote_status":"Processing","activation_date":"2020-12-01T08:00:00.000Z","sent_to_customer_date":"2020-12-01T08:00:00.000Z","customer_reference":"Pipeline 2021-10-06","completion_date":"2020-12-01T08:00:00.000Z","order_id":74,"expiry_days":30,"expiry_date":"2020-12-01T08:00:00.000Z","address":{"client_identifier":"string","id":8,"object":"address","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","first_name":"string","last_name":"string","company_name":"string","city":"Main Office","state_code":"TX","country_code":"US","street1":"915 W Dallas St","street2":"Unit 112","postal_code":"77019","phone_number":"+1 713-123-1234","is_primary":true,"is_warehouse":true},"store_comments":"","customer_comments":"","documents":[{}],"url":"https://domain.com/quote/x1D","attachment_url":"string"}
{
"id": 8,
"object": "quote",
"client_identifier": "string",
"quote_number": "ORD-000009158381-123",
"customer_id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"customer": {
"id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"object": "customer",
"first_name": "John",
"last_name": "Smit",
"company_name": "Widgets Inc",
"email_address": "john@widgetsinc.com",
"phone_number": "555-123-1234",
"account_id": 12,
"account_name": "Widgets Inc",
"account_number": "123456",
"discount_level_id": 14,
"discount_level_name": "PRICELEVEL-1"
},
"items": [
{}
],
"currency_code": "CAD",
"seller_currency_code": "USD",
"quote_status": "Processing",
"activation_date": "2020-12-01T08:00:00.000Z",
"sent_to_customer_date": "2020-12-01T08:00:00.000Z",
"customer_reference": "Pipeline 2021-10-06",
"completion_date": "2020-12-01T08:00:00.000Z",
"order_id": 74,
"expiry_days": 30,
"expiry_date": "2020-12-01T08:00:00.000Z",
"address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"store_comments": "",
"customer_comments": "",
"documents": [
{}
],
"url": "https://domain.com/quote/x1D",
"attachment_url": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Quote was successfully updated. | Quote |
400 | Bad Request | Quote could not be updated. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Decline the Quote
When you cannot provide a quote to the customer, you can send the customer a message letting them know why the quote was declined.
Code samples
# You can also use wget
curl -X PUT /api/v1/Quotes/decline/{id} \
-H 'Content-Type: application/json' \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePutRequest()
{
int id = 1;
string url = "/api/v1/Quotes/decline/{id}";
string json = @"{
""expand"": [
""string""
],
""message"": ""string""
}";
QuoteCancelOptions content = JsonConvert.DeserializeObject(json);
var result = await PutAsync(id, content, url);
}
/// Performs a PUT Request
public async Task PutAsync(int id, QuoteCancelOptions content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute PUT request
HttpResponseMessage response = await Client.PutAsync(url + $"/{id}", jsonContent);
//Return response
return await DeserializeObject(response);
}
/// Serialize an object to Json
private StringContent SerializeObject(QuoteCancelOptions content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','/api/v1/Quotes/decline/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.put('/api/v1/Quotes/decline/{id}', headers = headers)
print(r.json())
const inputBody = '{
"expand": [
"string"
],
"message": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Quotes/decline/{id}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.put '/api/v1/Quotes/decline/{id}',
params: {
}, headers: headers
p JSON.parse(result)
PUT /api/v1/Quotes/decline/{id}
Body parameter
{
"expand": [
"string"
],
"message": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the Quote that will be updated. |
body | body | QuoteCancelOptions | false | The message sent to the customer when cancelling an Quote. |
expand | body | [string] ¦ null | false | Array of strings for child properties to expand. |
message | body | string ¦ null | false | none |
Example responses
200 Response
{"id":8,"object":"quote","client_identifier":"string","quote_number":"ORD-000009158381-123","customer_id":"e49fe4dd-b087-439f-8897-bcfc84b5dacc","customer":{"id":"e49fe4dd-b087-439f-8897-bcfc84b5dacc","object":"customer","first_name":"John","last_name":"Smit","company_name":"Widgets Inc","email_address":"john@widgetsinc.com","phone_number":"555-123-1234","account_id":12,"account_name":"Widgets Inc","account_number":"123456","discount_level_id":14,"discount_level_name":"PRICELEVEL-1"},"items":[{}],"currency_code":"CAD","seller_currency_code":"USD","quote_status":"Processing","activation_date":"2020-12-01T08:00:00.000Z","sent_to_customer_date":"2020-12-01T08:00:00.000Z","customer_reference":"Pipeline 2021-10-06","completion_date":"2020-12-01T08:00:00.000Z","order_id":74,"expiry_days":30,"expiry_date":"2020-12-01T08:00:00.000Z","address":{"client_identifier":"string","id":8,"object":"address","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","first_name":"string","last_name":"string","company_name":"string","city":"Main Office","state_code":"TX","country_code":"US","street1":"915 W Dallas St","street2":"Unit 112","postal_code":"77019","phone_number":"+1 713-123-1234","is_primary":true,"is_warehouse":true},"store_comments":"","customer_comments":"","documents":[{}],"url":"https://domain.com/quote/x1D","attachment_url":"string"}
{
"id": 8,
"object": "quote",
"client_identifier": "string",
"quote_number": "ORD-000009158381-123",
"customer_id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"customer": {
"id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"object": "customer",
"first_name": "John",
"last_name": "Smit",
"company_name": "Widgets Inc",
"email_address": "john@widgetsinc.com",
"phone_number": "555-123-1234",
"account_id": 12,
"account_name": "Widgets Inc",
"account_number": "123456",
"discount_level_id": 14,
"discount_level_name": "PRICELEVEL-1"
},
"items": [
{}
],
"currency_code": "CAD",
"seller_currency_code": "USD",
"quote_status": "Processing",
"activation_date": "2020-12-01T08:00:00.000Z",
"sent_to_customer_date": "2020-12-01T08:00:00.000Z",
"customer_reference": "Pipeline 2021-10-06",
"completion_date": "2020-12-01T08:00:00.000Z",
"order_id": 74,
"expiry_days": 30,
"expiry_date": "2020-12-01T08:00:00.000Z",
"address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"store_comments": "",
"customer_comments": "",
"documents": [
{}
],
"url": "https://domain.com/quote/x1D",
"attachment_url": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Quote was successfully updated. | Quote |
400 | Bad Request | Quote could not be updated. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Send quote to customer
Code samples
# You can also use wget
curl -X PUT /api/v1/Quotes/sendtocustomer/{id} \
-H 'Content-Type: application/json' \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePutRequest()
{
int id = 1;
string url = "/api/v1/Quotes/sendtocustomer/{id}";
string json = @"{
""expand"": [
""string""
],
""message"": ""string"",
""expiry_date"": ""2019-08-24T14:15:22Z"",
""resend_email"": true
}";
QuoteConfirmOptions content = JsonConvert.DeserializeObject(json);
var result = await PutAsync(id, content, url);
}
/// Performs a PUT Request
public async Task PutAsync(int id, QuoteConfirmOptions content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute PUT request
HttpResponseMessage response = await Client.PutAsync(url + $"/{id}", jsonContent);
//Return response
return await DeserializeObject(response);
}
/// Serialize an object to Json
private StringContent SerializeObject(QuoteConfirmOptions content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','/api/v1/Quotes/sendtocustomer/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.put('/api/v1/Quotes/sendtocustomer/{id}', headers = headers)
print(r.json())
const inputBody = '{
"expand": [
"string"
],
"message": "string",
"expiry_date": "2019-08-24T14:15:22Z",
"resend_email": true
}';
const headers = {
'Content-Type':'application/json',
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Quotes/sendtocustomer/{id}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.put '/api/v1/Quotes/sendtocustomer/{id}',
params: {
}, headers: headers
p JSON.parse(result)
PUT /api/v1/Quotes/sendtocustomer/{id}
Body parameter
{
"expand": [
"string"
],
"message": "string",
"expiry_date": "2019-08-24T14:15:22Z",
"resend_email": true
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the Quote that will be updated. |
body | body | QuoteConfirmOptions | false | The message sent to the customer when cancelling an Quote. |
expand | body | [string] ¦ null | false | Array of strings for child properties to expand. |
message | body | string ¦ null | false | none |
expiry_date | body | string (date-time) ¦ null | false | none |
resend_email | body | boolean | false | none |
Example responses
200 Response
{"id":8,"object":"quote","client_identifier":"string","quote_number":"ORD-000009158381-123","customer_id":"e49fe4dd-b087-439f-8897-bcfc84b5dacc","customer":{"id":"e49fe4dd-b087-439f-8897-bcfc84b5dacc","object":"customer","first_name":"John","last_name":"Smit","company_name":"Widgets Inc","email_address":"john@widgetsinc.com","phone_number":"555-123-1234","account_id":12,"account_name":"Widgets Inc","account_number":"123456","discount_level_id":14,"discount_level_name":"PRICELEVEL-1"},"items":[{}],"currency_code":"CAD","seller_currency_code":"USD","quote_status":"Processing","activation_date":"2020-12-01T08:00:00.000Z","sent_to_customer_date":"2020-12-01T08:00:00.000Z","customer_reference":"Pipeline 2021-10-06","completion_date":"2020-12-01T08:00:00.000Z","order_id":74,"expiry_days":30,"expiry_date":"2020-12-01T08:00:00.000Z","address":{"client_identifier":"string","id":8,"object":"address","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","first_name":"string","last_name":"string","company_name":"string","city":"Main Office","state_code":"TX","country_code":"US","street1":"915 W Dallas St","street2":"Unit 112","postal_code":"77019","phone_number":"+1 713-123-1234","is_primary":true,"is_warehouse":true},"store_comments":"","customer_comments":"","documents":[{}],"url":"https://domain.com/quote/x1D","attachment_url":"string"}
{
"id": 8,
"object": "quote",
"client_identifier": "string",
"quote_number": "ORD-000009158381-123",
"customer_id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"customer": {
"id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"object": "customer",
"first_name": "John",
"last_name": "Smit",
"company_name": "Widgets Inc",
"email_address": "john@widgetsinc.com",
"phone_number": "555-123-1234",
"account_id": 12,
"account_name": "Widgets Inc",
"account_number": "123456",
"discount_level_id": 14,
"discount_level_name": "PRICELEVEL-1"
},
"items": [
{}
],
"currency_code": "CAD",
"seller_currency_code": "USD",
"quote_status": "Processing",
"activation_date": "2020-12-01T08:00:00.000Z",
"sent_to_customer_date": "2020-12-01T08:00:00.000Z",
"customer_reference": "Pipeline 2021-10-06",
"completion_date": "2020-12-01T08:00:00.000Z",
"order_id": 74,
"expiry_days": 30,
"expiry_date": "2020-12-01T08:00:00.000Z",
"address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"store_comments": "",
"customer_comments": "",
"documents": [
{}
],
"url": "https://domain.com/quote/x1D",
"attachment_url": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Quote was successfully updated. | Quote |
400 | Bad Request | Quote could not be updated. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Search
Retrieve a List of global search results
A maximum of 100 records can be requested at once. If more records are needed, a page can be supplied to get the next set of records.
Code samples
# You can also use wget
curl -X GET /api/v1/Search \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/Search";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/Search', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/Search', headers = headers)
print(r.json())
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Search',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/Search',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/Search
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Term | query | string | false | The search term to query |
Limit | query | integer(int32) | false | A limit on the number of objects to be returned, between 1 and 100. |
Page | query | integer(int32) | false | The page of the results. |
Types | query | array[string] | false | Search Types are limited to the following pre-defined values: |
Detailed descriptions
Types: Search Types are limited to the following pre-defined values: - Product - Brand - Category - Inventory
Example responses
200 Response
{
"object": "list",
"data": [
{}
],
"has_more": true,
"total_items": 0,
"url": "string",
"count": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | SKUs successfully retrieved. | SearchResults |
400 | Bad Request | SKUs could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Shipments
Retrieve a List of Shipments
A maximum of 100 records can be requested at once. If more records are needed, a page can be supplied to get the next set of records. If no IDs are supplied, all available Shipments (up to the maximum) will be returned.
Code samples
# You can also use wget
curl -X GET /api/v1/Shipments \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/Shipments";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/Shipments', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/Shipments', headers = headers)
print(r.json())
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Shipments',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/Shipments',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/Shipments
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Statuses | query | array[string] | false | Return only Shipments with corresponding statuses. |
CreatedOnMin | query | string(date-time) | false | The minimum created on date for the list of Shipments. Must be less than or equal to CreatedOnMax . |
CreatedOnMax | query | string(date-time) | false | The maximum created on date for the list of Shipments. Must be greater than or equal to CreatedOnMin . |
SinceId | query | integer(int64) | false | The Shpment with this ID as well as Shipments created before it will be excluded from the response. |
Ids | query | array[integer] | false | The IDs of the objects that are being requested. |
Page | query | integer(int32) | false | The page of the results. |
Limit | query | integer(int32) | false | A limit on the number of objects to be returned, between 1 and 100. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Enumerated Values
Parameter | Value |
---|---|
Statuses | New |
Statuses | Pending |
Statuses | InfoReceived |
Statuses | InTransit |
Statuses | OutForDelivery |
Statuses | AttemptFail |
Statuses | Delivered |
Statuses | AvailableForPickup |
Statuses | Exception |
Statuses | Expired |
Statuses | ReturnToSender |
Statuses | PickedUp |
Statuses | Unknown |
Example responses
200 Response
[
{
"id": 3543,
"object": "shipment",
"client_identifier": "string",
"order_id": 2,
"shipped_date": "2020-12-01T08:00:00.000Z",
"estimated_delivery_date": "2020-12-08T08:00:00.000Z",
"tracking_number": "2000000002",
"tracking_url": "https://www.fedex.com/apps/fedextrack/?action=track%26trackingnumber=2000000002%26cntry_code=ca%26locale=en_CA",
"carrier": "FedEx",
"items": [],
"add_ons": [],
"shipment_type": "Tracked",
"created_on": "2020-12-01T08:00:00.000Z",
"trackings": [],
"address": {},
"status": "InTransit"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Shipments successfully retrieved. | Inline |
400 | Bad Request | Shipments could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Response Schema
Status Code 200
Name | Type | Required | Description |
---|---|---|---|
anonymous | [Shipment] | false | [The Shipment object contains information about shipments for an order.An order can be sent out in multiple shipments, or as a single one. Shipments will have a status that indicates the shipment's current tracking status. If a shipment was created as a tracked shipment, the status will be upated automatically, otherwise, the seller will need to provide manual updates. A Shipment will have a tracking number, url, carrier and other fields related to shipment tracking.] |
» id | integer (int64) | false | The primary identifier of the Shipment |
» object | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
» client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
» order_id | integer (int64) | false | The ID of the Order that the Shipment is attached to. |
» shipped_date | string (date-time) ¦ null | false | The UTC date the Shipment was shipped. |
» estimated_delivery_date | string (date-time) ¦ null | false | The UTC date of when Shipment is expected to be delivered. |
» tracking_number | string ¦ null | false | The tracking number of the shipment. |
» tracking_url | string ¦ null | false | External url where the customer can go to track their shipment. |
» carrier | string ¦ null | false | Name of the carrier/courier. If shipment type is Tracked. It must match one of the values in /api/v1/Shipments/Carriers |
» items | [ShipmentItem] ¦ null | false | List of items attached to the shipment. When creating a shipment, leave items empty to attach all remaining items to the shipment automatically. |
» add_ons | [ShipmentAddOn] ¦ null | false | List of addons attached to the shipment. When creating a shipment, leave items empty to attach all remaining addons to the shipment automatically. |
» shipment_type | string | false | Gets the shipment type. - Tracked - If carrier name matches list, all information will be updated from the carrier. - Custom - All information must be supplied and updated by the seller. |
» created_on | string (date-time) | false | The UTC date the Shipment was created on. |
» trackings | [ShipmentTracking] ¦ null | false | Tracking history of the shipment/ |
» address | Address | false | The Address object contains information about a place, or location. Examples are - Offices - Warehouses - Shipping Addresses - Billing Addresses |
» status | string | false | Gets the shipment status. - New - Shipment has not been supplied a Shipped Date yet. - Pending - Shipment has not been submitted to the carrier yet. - InfoReceived - Carrier has received information, but not picked up the shipment yet. - InTransit - Carrier has picked up the shipment, and is on route. - OutForDelivery - Shipment has left the carrier depot, and is out for delivery. - AttemptFail - Carrier could not delivery shipment to customer. - Delivered - Carrier successfully delivered shipment to customer. - AvailableForPickup - Customer must pick up shipment from carrier. - Exception - Something went wrong. - Expired - Took too long for carrier to receive the package. - ReturnToSender - Shipment is being returned to the sender. |
Enumerated Values
Property | Value |
---|---|
shipment_type | Tracked |
shipment_type | Custom |
shipment_type | Pickup |
status | New |
status | Pending |
status | InfoReceived |
status | InTransit |
status | OutForDelivery |
status | AttemptFail |
status | Delivered |
status | AvailableForPickup |
status | Exception |
status | Expired |
status | ReturnToSender |
status | PickedUp |
status | Unknown |
Retrieve a Shipment
Code samples
# You can also use wget
curl -X GET /api/v1/Shipments/{id} \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/Shipments/{id}";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/Shipments/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/Shipments/{id}', headers = headers)
print(r.json())
const headers = {
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Shipments/{id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/Shipments/{id}',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/Shipments/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the Shipment being requested. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Example responses
200 Response
{"id":3543,"object":"shipment","client_identifier":"string","order_id":2,"shipped_date":"2020-12-01T08:00:00.000Z","estimated_delivery_date":"2020-12-08T08:00:00.000Z","tracking_number":"2000000002","tracking_url":"https://www.fedex.com/apps/fedextrack/?action=track%26trackingnumber=2000000002%26cntry_code=ca%26locale=en_CA","carrier":"FedEx","items":[{}],"add_ons":[{}],"shipment_type":"Tracked","created_on":"2020-12-01T08:00:00.000Z","trackings":[{}],"address":{"client_identifier":"string","id":8,"object":"address","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","first_name":"string","last_name":"string","company_name":"string","city":"Main Office","state_code":"TX","country_code":"US","street1":"915 W Dallas St","street2":"Unit 112","postal_code":"77019","phone_number":"+1 713-123-1234","is_primary":true,"is_warehouse":true},"status":"InTransit"}
{
"id": 3543,
"object": "shipment",
"client_identifier": "string",
"order_id": 2,
"shipped_date": "2020-12-01T08:00:00.000Z",
"estimated_delivery_date": "2020-12-08T08:00:00.000Z",
"tracking_number": "2000000002",
"tracking_url": "https://www.fedex.com/apps/fedextrack/?action=track%26trackingnumber=2000000002%26cntry_code=ca%26locale=en_CA",
"carrier": "FedEx",
"items": [
{}
],
"add_ons": [
{}
],
"shipment_type": "Tracked",
"created_on": "2020-12-01T08:00:00.000Z",
"trackings": [
{}
],
"address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"status": "InTransit"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Shipment successfully retrieved. | Shipment |
400 | Bad Request | Shipment could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Delete a Shipment
Code samples
# You can also use wget
curl -X DELETE /api/v1/Shipments/{id} \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeDeleteRequest()
{
int id = 1;
string url = "/api/v1/Shipments/{id}";
await DeleteAsync(id, url);
}
/// Performs a DELETE Request
public async Task DeleteAsync(int id, string url)
{
//Execute DELETE request
HttpResponseMessage response = await Client.DeleteAsync(url + $"/{id}");
//Return response
await DeserializeObject(response);
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','/api/v1/Shipments/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.delete('/api/v1/Shipments/{id}', headers = headers)
print(r.json())
const headers = {
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/Shipments/{id}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.delete '/api/v1/Shipments/{id}',
params: {
}, headers: headers
p JSON.parse(result)
DELETE /api/v1/Shipments/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int32) | true | The ID of the Shipment being requested. |
Example responses
200 Response
{"id":3543,"object":"shipment","client_identifier":"string","order_id":2,"shipped_date":"2020-12-01T08:00:00.000Z","estimated_delivery_date":"2020-12-08T08:00:00.000Z","tracking_number":"2000000002","tracking_url":"https://www.fedex.com/apps/fedextrack/?action=track%26trackingnumber=2000000002%26cntry_code=ca%26locale=en_CA","carrier":"FedEx","items":[{}],"add_ons":[{}],"shipment_type":"Tracked","created_on":"2020-12-01T08:00:00.000Z","trackings":[{}],"address":{"client_identifier":"string","id":8,"object":"address","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","first_name":"string","last_name":"string","company_name":"string","city":"Main Office","state_code":"TX","country_code":"US","street1":"915 W Dallas St","street2":"Unit 112","postal_code":"77019","phone_number":"+1 713-123-1234","is_primary":true,"is_warehouse":true},"status":"InTransit"}
{
"id": 3543,
"object": "shipment",
"client_identifier": "string",
"order_id": 2,
"shipped_date": "2020-12-01T08:00:00.000Z",
"estimated_delivery_date": "2020-12-08T08:00:00.000Z",
"tracking_number": "2000000002",
"tracking_url": "https://www.fedex.com/apps/fedextrack/?action=track%26trackingnumber=2000000002%26cntry_code=ca%26locale=en_CA",
"carrier": "FedEx",
"items": [
{}
],
"add_ons": [
{}
],
"shipment_type": "Tracked",
"created_on": "2020-12-01T08:00:00.000Z",
"trackings": [
{}
],
"address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"status": "InTransit"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Shipment successfully retrieved. | Shipment |
400 | Bad Request | Shipment could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
ShippingRates
Retrieve a List of Shipping Rates
A maximum of 100 records can be requested at once. If more records are needed, a page can be supplied to get the next set of records. If no IDs are supplied, all available Shipping Rates (up to the maximum) will be returned.
Code samples
# You can also use wget
curl -X GET /api/v1/ShippingRates \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/ShippingRates";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/ShippingRates', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/ShippingRates', headers = headers)
print(r.json())
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/ShippingRates',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/ShippingRates',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/ShippingRates
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Ids | query | array[integer] | false | The IDs of the objects that are being requested. |
Page | query | integer(int32) | false | The page of the results. |
Limit | query | integer(int32) | false | A limit on the number of objects to be returned, between 1 and 100. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Example responses
200 Response
{
"object": "list",
"data": [
{}
],
"has_more": true,
"total_items": 0,
"url": "string",
"count": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Shipping Rates successfully retrieved. | ShippingRates |
400 | Bad Request | Shipping Rates could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Create a New Shipping Rate
Code samples
# You can also use wget
curl -X POST /api/v1/ShippingRates \
-H 'Content-Type: application/json' \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePostRequest()
{
string url = "/api/v1/ShippingRates";
string json = @"{
""client_identifier"": ""string"",
""name"": ""Heavy Items"",
""shipping_economy"": 9.99,
""shipping_economy_additional"": 5.99,
""is_free_shipping"": false,
""economy_days_from"": 5,
""economy_days_to"": 7,
""shipping_priority"": 9.99,
""shipping_priority_additional"": 5.99,
""is_free_shipping_priority"": false,
""priority_days_from"": 1,
""priority_days_to"": 3,
""international_shipping_economy"": 9.99,
""international_shipping_economy_additional"": 6.99,
""is_free_international_shipping"": false,
""international_economy_days_from"": 7,
""international_economy_days_to"": 30,
""international_shipping_priority"": 9.99,
""international_shipping_priority_additional"": 6.99,
""is_free_international_shipping_priority"": false,
""international_priority_days_from"": 1,
""international_priority_days_to"": 3,
""is_default"": false,
""notes"": """"
}";
ShippingRateRequest content = JsonConvert.DeserializeObject(json);
await PostAsync(content, url);
}
/// Performs a POST Request
public async Task PostAsync(ShippingRateRequest content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute POST request
HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
}
/// Serialize an object to Json
private StringContent SerializeObject(ShippingRateRequest content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api/v1/ShippingRates', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/api/v1/ShippingRates', headers = headers)
print(r.json())
const inputBody = '{
"client_identifier": "string",
"name": "Heavy Items",
"shipping_economy": 9.99,
"shipping_economy_additional": 5.99,
"is_free_shipping": false,
"economy_days_from": 5,
"economy_days_to": 7,
"shipping_priority": 9.99,
"shipping_priority_additional": 5.99,
"is_free_shipping_priority": false,
"priority_days_from": 1,
"priority_days_to": 3,
"international_shipping_economy": 9.99,
"international_shipping_economy_additional": 6.99,
"is_free_international_shipping": false,
"international_economy_days_from": 7,
"international_economy_days_to": 30,
"international_shipping_priority": 9.99,
"international_shipping_priority_additional": 6.99,
"is_free_international_shipping_priority": false,
"international_priority_days_from": 1,
"international_priority_days_to": 3,
"is_default": false,
"notes": ""
}';
const headers = {
'Content-Type':'application/json',
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/ShippingRates',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/api/v1/ShippingRates',
params: {
}, headers: headers
p JSON.parse(result)
POST /api/v1/ShippingRates
Body parameter
{
"client_identifier": "string",
"name": "Heavy Items",
"shipping_economy": 9.99,
"shipping_economy_additional": 5.99,
"is_free_shipping": false,
"economy_days_from": 5,
"economy_days_to": 7,
"shipping_priority": 9.99,
"shipping_priority_additional": 5.99,
"is_free_shipping_priority": false,
"priority_days_from": 1,
"priority_days_to": 3,
"international_shipping_economy": 9.99,
"international_shipping_economy_additional": 6.99,
"is_free_international_shipping": false,
"international_economy_days_from": 7,
"international_economy_days_to": 30,
"international_shipping_priority": 9.99,
"international_shipping_priority_additional": 6.99,
"is_free_international_shipping_priority": false,
"international_priority_days_from": 1,
"international_priority_days_to": 3,
"is_default": false,
"notes": ""
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | ShippingRateRequest | false | The Shipping Rate to be created. |
client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
name | body | string ¦ null | false | The name of the Shipping Rate. For internal use only. |
shipping_economy | body | number (double) ¦ null | false | The base cost for an item to be shipped using an economy shipment to your local regions. |
shipping_economy_additional | body | number (double) ¦ null | false | The additional cost for every item past the first item using an economy shipment to your local regions. |
is_free_shipping | body | boolean | false | Will override any ShippingEconomy and ShippingEconomyAdditional rates to 0 |
economy_days_from | body | integer (int32) ¦ null | false | The minimum amount of days to normally ship an item to your local regions using an economy shipment. |
economy_days_to | body | integer (int32) ¦ null | false | The maximum amount of days to normally ship an item to your local regions using an economy shipment. |
shipping_priority | body | number (double) ¦ null | false | The base cost for an item to be shipped using an priority shipment to your local regions. |
shipping_priority_additional | body | number (double) ¦ null | false | The additional cost for every item past the first item using an priority shipment to your local regions. |
is_free_shipping_priority | body | boolean | false | Will override any ShippingPriority and ShippingPriorityAdditional rates to 0 |
priority_days_from | body | integer (int32) ¦ null | false | The minimum amount of days to normally ship an item to your local regions using a priority shipment. |
priority_days_to | body | integer (int32) ¦ null | false | The maximum amount of days to normally ship an item to your local regions using a priority shipment. |
international_shipping_economy | body | number (double) ¦ null | false | The base cost for an item to be shipped using an economy shipment to outside your local regions. |
international_shipping_economy_additional | body | number (double) ¦ null | false | The additional cost for every item past the first item using an economy shipment to outside your local regions. |
is_free_international_shipping | body | boolean | false | Will override any InternationalShippingEconomy and InternationalShippingEconomyAdditional rates to 0 |
international_economy_days_from | body | integer (int32) ¦ null | false | The minimum amount of days to normally ship an item to outside your local regions using a economy shipment. |
international_economy_days_to | body | integer (int32) ¦ null | false | The maximum amount of days to normally ship an item to outside your local regions using a economy shipment. |
international_shipping_priority | body | number (double) ¦ null | false | The base cost for an item to be shipped using a priority shipment to your local regions. |
international_shipping_priority_additional | body | number (double) ¦ null | false | The additional cost for every item past the first item using an priority shipment to outside your local regions. |
is_free_international_shipping_priority | body | boolean | false | Will override any InternationalShippingPriority and InternationalShippingPriorityAdditional rates to 0 |
international_priority_days_from | body | integer (int32) ¦ null | false | The minimum amount of days to normally ship an item to your outside local regions using a priority shipment. |
international_priority_days_to | body | integer (int32) ¦ null | false | The maximum amount of days to normally ship an item to outside your local regions using a priority shipment. |
is_default | body | boolean | false | Your default shipping rate will be applied to all SKUs that have not specified a different shipping ate. |
notes | body | string ¦ null | false | Notes for internal use only. |
Example responses
200 Response
{"id":4,"object":"shippingrate","client_identifier":"string","name":"Heavy Items","shipping_economy":9.99,"shipping_economy_additional":5.99,"is_free_shipping":false,"economy_days_from":5,"economy_days_to":7,"shipping_priority":9.99,"shipping_priority_additional":5.99,"is_free_shipping_priority":false,"priority_days_from":1,"priority_days_to":3,"international_shipping_economy":9.99,"international_shipping_economy_additional":6.99,"is_free_international_shipping":false,"international_economy_days_from":7,"international_economy_days_to":30,"international_shipping_priority":9.99,"international_shipping_priority_additional":6.99,"is_free_international_shipping_priority":false,"international_priority_days_from":1,"international_priority_days_to":3,"is_default":false,"notes":""}
{
"id": 4,
"object": "shippingrate",
"client_identifier": "string",
"name": "Heavy Items",
"shipping_economy": 9.99,
"shipping_economy_additional": 5.99,
"is_free_shipping": false,
"economy_days_from": 5,
"economy_days_to": 7,
"shipping_priority": 9.99,
"shipping_priority_additional": 5.99,
"is_free_shipping_priority": false,
"priority_days_from": 1,
"priority_days_to": 3,
"international_shipping_economy": 9.99,
"international_shipping_economy_additional": 6.99,
"is_free_international_shipping": false,
"international_economy_days_from": 7,
"international_economy_days_to": 30,
"international_shipping_priority": 9.99,
"international_shipping_priority_additional": 6.99,
"is_free_international_shipping_priority": false,
"international_priority_days_from": 1,
"international_priority_days_to": 3,
"is_default": false,
"notes": ""
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Shipping Rate was successfully created. | ShippingRate |
400 | Bad Request | Shipping Rate could not be created. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Retrieve a Shipping Rate
Code samples
# You can also use wget
curl -X GET /api/v1/ShippingRates/{id} \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/ShippingRates/{id}";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/ShippingRates/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/ShippingRates/{id}', headers = headers)
print(r.json())
const headers = {
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/ShippingRates/{id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/ShippingRates/{id}',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/ShippingRates/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the Shipping Rate being requested. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Example responses
200 Response
{"id":4,"object":"shippingrate","client_identifier":"string","name":"Heavy Items","shipping_economy":9.99,"shipping_economy_additional":5.99,"is_free_shipping":false,"economy_days_from":5,"economy_days_to":7,"shipping_priority":9.99,"shipping_priority_additional":5.99,"is_free_shipping_priority":false,"priority_days_from":1,"priority_days_to":3,"international_shipping_economy":9.99,"international_shipping_economy_additional":6.99,"is_free_international_shipping":false,"international_economy_days_from":7,"international_economy_days_to":30,"international_shipping_priority":9.99,"international_shipping_priority_additional":6.99,"is_free_international_shipping_priority":false,"international_priority_days_from":1,"international_priority_days_to":3,"is_default":false,"notes":""}
{
"id": 4,
"object": "shippingrate",
"client_identifier": "string",
"name": "Heavy Items",
"shipping_economy": 9.99,
"shipping_economy_additional": 5.99,
"is_free_shipping": false,
"economy_days_from": 5,
"economy_days_to": 7,
"shipping_priority": 9.99,
"shipping_priority_additional": 5.99,
"is_free_shipping_priority": false,
"priority_days_from": 1,
"priority_days_to": 3,
"international_shipping_economy": 9.99,
"international_shipping_economy_additional": 6.99,
"is_free_international_shipping": false,
"international_economy_days_from": 7,
"international_economy_days_to": 30,
"international_shipping_priority": 9.99,
"international_shipping_priority_additional": 6.99,
"is_free_international_shipping_priority": false,
"international_priority_days_from": 1,
"international_priority_days_to": 3,
"is_default": false,
"notes": ""
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Shipping Rate successfully retrieved. | ShippingRate |
400 | Bad Request | Shipping Rate could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Update a ShippingRate
Code samples
# You can also use wget
curl -X PUT /api/v1/ShippingRates/{id} \
-H 'Content-Type: application/json' \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePutRequest()
{
int id = 1;
string url = "/api/v1/ShippingRates/{id}";
string json = @"{
""client_identifier"": ""string"",
""name"": ""Heavy Items"",
""shipping_economy"": 9.99,
""shipping_economy_additional"": 5.99,
""is_free_shipping"": false,
""economy_days_from"": 5,
""economy_days_to"": 7,
""shipping_priority"": 9.99,
""shipping_priority_additional"": 5.99,
""is_free_shipping_priority"": false,
""priority_days_from"": 1,
""priority_days_to"": 3,
""international_shipping_economy"": 9.99,
""international_shipping_economy_additional"": 6.99,
""is_free_international_shipping"": false,
""international_economy_days_from"": 7,
""international_economy_days_to"": 30,
""international_shipping_priority"": 9.99,
""international_shipping_priority_additional"": 6.99,
""is_free_international_shipping_priority"": false,
""international_priority_days_from"": 1,
""international_priority_days_to"": 3,
""is_default"": false,
""notes"": """"
}";
ShippingRateRequest content = JsonConvert.DeserializeObject(json);
var result = await PutAsync(id, content, url);
}
/// Performs a PUT Request
public async Task PutAsync(int id, ShippingRateRequest content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute PUT request
HttpResponseMessage response = await Client.PutAsync(url + $"/{id}", jsonContent);
//Return response
return await DeserializeObject(response);
}
/// Serialize an object to Json
private StringContent SerializeObject(ShippingRateRequest content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','/api/v1/ShippingRates/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.put('/api/v1/ShippingRates/{id}', headers = headers)
print(r.json())
const inputBody = '{
"client_identifier": "string",
"name": "Heavy Items",
"shipping_economy": 9.99,
"shipping_economy_additional": 5.99,
"is_free_shipping": false,
"economy_days_from": 5,
"economy_days_to": 7,
"shipping_priority": 9.99,
"shipping_priority_additional": 5.99,
"is_free_shipping_priority": false,
"priority_days_from": 1,
"priority_days_to": 3,
"international_shipping_economy": 9.99,
"international_shipping_economy_additional": 6.99,
"is_free_international_shipping": false,
"international_economy_days_from": 7,
"international_economy_days_to": 30,
"international_shipping_priority": 9.99,
"international_shipping_priority_additional": 6.99,
"is_free_international_shipping_priority": false,
"international_priority_days_from": 1,
"international_priority_days_to": 3,
"is_default": false,
"notes": ""
}';
const headers = {
'Content-Type':'application/json',
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/ShippingRates/{id}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.put '/api/v1/ShippingRates/{id}',
params: {
}, headers: headers
p JSON.parse(result)
PUT /api/v1/ShippingRates/{id}
Body parameter
{
"client_identifier": "string",
"name": "Heavy Items",
"shipping_economy": 9.99,
"shipping_economy_additional": 5.99,
"is_free_shipping": false,
"economy_days_from": 5,
"economy_days_to": 7,
"shipping_priority": 9.99,
"shipping_priority_additional": 5.99,
"is_free_shipping_priority": false,
"priority_days_from": 1,
"priority_days_to": 3,
"international_shipping_economy": 9.99,
"international_shipping_economy_additional": 6.99,
"is_free_international_shipping": false,
"international_economy_days_from": 7,
"international_economy_days_to": 30,
"international_shipping_priority": 9.99,
"international_shipping_priority_additional": 6.99,
"is_free_international_shipping_priority": false,
"international_priority_days_from": 1,
"international_priority_days_to": 3,
"is_default": false,
"notes": ""
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the ShippingRate that will be updated. |
body | body | ShippingRateRequest | false | The ShippingRate to be updated. |
client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
name | body | string ¦ null | false | The name of the Shipping Rate. For internal use only. |
shipping_economy | body | number (double) ¦ null | false | The base cost for an item to be shipped using an economy shipment to your local regions. |
shipping_economy_additional | body | number (double) ¦ null | false | The additional cost for every item past the first item using an economy shipment to your local regions. |
is_free_shipping | body | boolean | false | Will override any ShippingEconomy and ShippingEconomyAdditional rates to 0 |
economy_days_from | body | integer (int32) ¦ null | false | The minimum amount of days to normally ship an item to your local regions using an economy shipment. |
economy_days_to | body | integer (int32) ¦ null | false | The maximum amount of days to normally ship an item to your local regions using an economy shipment. |
shipping_priority | body | number (double) ¦ null | false | The base cost for an item to be shipped using an priority shipment to your local regions. |
shipping_priority_additional | body | number (double) ¦ null | false | The additional cost for every item past the first item using an priority shipment to your local regions. |
is_free_shipping_priority | body | boolean | false | Will override any ShippingPriority and ShippingPriorityAdditional rates to 0 |
priority_days_from | body | integer (int32) ¦ null | false | The minimum amount of days to normally ship an item to your local regions using a priority shipment. |
priority_days_to | body | integer (int32) ¦ null | false | The maximum amount of days to normally ship an item to your local regions using a priority shipment. |
international_shipping_economy | body | number (double) ¦ null | false | The base cost for an item to be shipped using an economy shipment to outside your local regions. |
international_shipping_economy_additional | body | number (double) ¦ null | false | The additional cost for every item past the first item using an economy shipment to outside your local regions. |
is_free_international_shipping | body | boolean | false | Will override any InternationalShippingEconomy and InternationalShippingEconomyAdditional rates to 0 |
international_economy_days_from | body | integer (int32) ¦ null | false | The minimum amount of days to normally ship an item to outside your local regions using a economy shipment. |
international_economy_days_to | body | integer (int32) ¦ null | false | The maximum amount of days to normally ship an item to outside your local regions using a economy shipment. |
international_shipping_priority | body | number (double) ¦ null | false | The base cost for an item to be shipped using a priority shipment to your local regions. |
international_shipping_priority_additional | body | number (double) ¦ null | false | The additional cost for every item past the first item using an priority shipment to outside your local regions. |
is_free_international_shipping_priority | body | boolean | false | Will override any InternationalShippingPriority and InternationalShippingPriorityAdditional rates to 0 |
international_priority_days_from | body | integer (int32) ¦ null | false | The minimum amount of days to normally ship an item to your outside local regions using a priority shipment. |
international_priority_days_to | body | integer (int32) ¦ null | false | The maximum amount of days to normally ship an item to outside your local regions using a priority shipment. |
is_default | body | boolean | false | Your default shipping rate will be applied to all SKUs that have not specified a different shipping ate. |
notes | body | string ¦ null | false | Notes for internal use only. |
Example responses
200 Response
{"id":4,"object":"shippingrate","client_identifier":"string","name":"Heavy Items","shipping_economy":9.99,"shipping_economy_additional":5.99,"is_free_shipping":false,"economy_days_from":5,"economy_days_to":7,"shipping_priority":9.99,"shipping_priority_additional":5.99,"is_free_shipping_priority":false,"priority_days_from":1,"priority_days_to":3,"international_shipping_economy":9.99,"international_shipping_economy_additional":6.99,"is_free_international_shipping":false,"international_economy_days_from":7,"international_economy_days_to":30,"international_shipping_priority":9.99,"international_shipping_priority_additional":6.99,"is_free_international_shipping_priority":false,"international_priority_days_from":1,"international_priority_days_to":3,"is_default":false,"notes":""}
{
"id": 4,
"object": "shippingrate",
"client_identifier": "string",
"name": "Heavy Items",
"shipping_economy": 9.99,
"shipping_economy_additional": 5.99,
"is_free_shipping": false,
"economy_days_from": 5,
"economy_days_to": 7,
"shipping_priority": 9.99,
"shipping_priority_additional": 5.99,
"is_free_shipping_priority": false,
"priority_days_from": 1,
"priority_days_to": 3,
"international_shipping_economy": 9.99,
"international_shipping_economy_additional": 6.99,
"is_free_international_shipping": false,
"international_economy_days_from": 7,
"international_economy_days_to": 30,
"international_shipping_priority": 9.99,
"international_shipping_priority_additional": 6.99,
"is_free_international_shipping_priority": false,
"international_priority_days_from": 1,
"international_priority_days_to": 3,
"is_default": false,
"notes": ""
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | ShippingRate was successfully updated. | ShippingRate |
400 | Bad Request | ShippingRate could not be updated. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Delete a Shipping Rate
Code samples
# You can also use wget
curl -X DELETE /api/v1/ShippingRates/{id} \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeDeleteRequest()
{
int id = 1;
string url = "/api/v1/ShippingRates/{id}";
await DeleteAsync(id, url);
}
/// Performs a DELETE Request
public async Task DeleteAsync(int id, string url)
{
//Execute DELETE request
HttpResponseMessage response = await Client.DeleteAsync(url + $"/{id}");
//Return response
await DeserializeObject(response);
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','/api/v1/ShippingRates/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.delete('/api/v1/ShippingRates/{id}', headers = headers)
print(r.json())
const headers = {
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/ShippingRates/{id}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.delete '/api/v1/ShippingRates/{id}',
params: {
}, headers: headers
p JSON.parse(result)
DELETE /api/v1/ShippingRates/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the Shipping Rate to be deleted. |
Example responses
200 Response
{"id":4,"object":"shippingrate","client_identifier":"string","name":"Heavy Items","shipping_economy":9.99,"shipping_economy_additional":5.99,"is_free_shipping":false,"economy_days_from":5,"economy_days_to":7,"shipping_priority":9.99,"shipping_priority_additional":5.99,"is_free_shipping_priority":false,"priority_days_from":1,"priority_days_to":3,"international_shipping_economy":9.99,"international_shipping_economy_additional":6.99,"is_free_international_shipping":false,"international_economy_days_from":7,"international_economy_days_to":30,"international_shipping_priority":9.99,"international_shipping_priority_additional":6.99,"is_free_international_shipping_priority":false,"international_priority_days_from":1,"international_priority_days_to":3,"is_default":false,"notes":""}
{
"id": 4,
"object": "shippingrate",
"client_identifier": "string",
"name": "Heavy Items",
"shipping_economy": 9.99,
"shipping_economy_additional": 5.99,
"is_free_shipping": false,
"economy_days_from": 5,
"economy_days_to": 7,
"shipping_priority": 9.99,
"shipping_priority_additional": 5.99,
"is_free_shipping_priority": false,
"priority_days_from": 1,
"priority_days_to": 3,
"international_shipping_economy": 9.99,
"international_shipping_economy_additional": 6.99,
"is_free_international_shipping": false,
"international_economy_days_from": 7,
"international_economy_days_to": 30,
"international_shipping_priority": 9.99,
"international_shipping_priority_additional": 6.99,
"is_free_international_shipping_priority": false,
"international_priority_days_from": 1,
"international_priority_days_to": 3,
"is_default": false,
"notes": ""
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Shipping Rate was successfully deleted. | ShippingRate |
400 | Bad Request | Shipping Rate could not be deleted. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
SKUs
Retrieve a List of SKUs
A maximum of 100 records can be requested at once. If more records are needed, a page can be supplied to get the next set of records. If no IDs are supplied, all available SKUs (up to the maximum) will be returned.
Code samples
# You can also use wget
curl -X GET /api/v1/SKUs \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/SKUs";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/SKUs', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/SKUs', headers = headers)
print(r.json())
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/SKUs',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/SKUs',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/SKUs
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
SinceId | query | integer(int64) | false | Restrict results to after the specified Id. |
CreatedOnMin | query | string(date-time) | false | The minimum created on date for the list of SKUs. Must be less than or equal to CreatedOnMax . |
CreatedOnMax | query | string(date-time) | false | The maximum created on date for the list of SKUs. Must be greater than or equal to CreatedOnMin . |
BrandId | query | integer(int64) | false | The response will include only SKUs from this Brand. |
Created | query | string(date-time) | false | A filter on the list based on the object created field. The value can be a |
Ids | query | array[integer] | false | The IDs of the objects that are being requested. |
Page | query | integer(int32) | false | The page of the results. |
Limit | query | integer(int32) | false | A limit on the number of objects to be returned, between 1 and 100. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Detailed descriptions
Created: A filter on the list based on the object created
field. The value can be a
System.DateTime.
Example responses
200 Response
{
"object": "list",
"data": [
{}
],
"has_more": true,
"total_items": 0,
"url": "string",
"count": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | SKUs successfully retrieved. | Skus |
400 | Bad Request | SKUs could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Create a New SKU
Code samples
# You can also use wget
curl -X POST /api/v1/SKUs \
-H 'Content-Type: application/json' \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePostRequest()
{
string url = "/api/v1/SKUs";
string json = @"{
""client_identifier"": ""string"",
""library_product_id"": 1188203,
""store_product_id"": 1188203,
""sku_identifier"": ""PDA111-1"",
""manufacturer_part_number"": ""PDA111-1"",
""short_description"": ""string"",
""description"": """",
""list_price"": 75.99,
""sale_price"": 45.99,
""is_on_sale"": true,
""sale_start_date"": ""2020-12-01T08:00:00.000Z"",
""sale_end_date"": ""2020-12-31T21:00:00.000Z"",
""sale_maximum_quantity"": 0,
""sale_label"": ""string"",
""sale_minimum_quantity"": 0,
""inventory"": 45,
""unit_of_measure"": ""EACH"",
""unit_of_measure_quantity"": 1,
""always_in_stock"": true,
""shipping_rate_id"": 2,
""address_id"": 3,
""quantity_discount_id"": 3,
""allow_backorders"": true,
""lead_time_from"": 7,
""lead_time_to"": 15,
""lead_time_message"": ""15"",
""price_discounts"": [
{}
],
""add_ons"": [
{}
],
""is_non_refundable"": true,
""is_non_refundable_message"": ""string"",
""length"": 15,
""width"": 7,
""height"": 5,
""weight"": 1500,
""classification"": ""string"",
""unspsc_classification"": ""string"",
""inventory_alert"": 0,
""is_featured"": true,
""price_visibility"": ""InheritFromProduct"",
""login_for_pricing_message"": ""string"",
""in_stock_message"": ""string"",
""out_of_stock_message"": ""string"",
""request_quote"": true
}";
SkuRequest content = JsonConvert.DeserializeObject(json);
await PostAsync(content, url);
}
/// Performs a POST Request
public async Task PostAsync(SkuRequest content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute POST request
HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
}
/// Serialize an object to Json
private StringContent SerializeObject(SkuRequest content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api/v1/SKUs', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/api/v1/SKUs', headers = headers)
print(r.json())
const inputBody = '{
"client_identifier": "string",
"library_product_id": 1188203,
"store_product_id": 1188203,
"sku_identifier": "PDA111-1",
"manufacturer_part_number": "PDA111-1",
"short_description": "string",
"description": "",
"list_price": 75.99,
"sale_price": 45.99,
"is_on_sale": true,
"sale_start_date": "2020-12-01T08:00:00.000Z",
"sale_end_date": "2020-12-31T21:00:00.000Z",
"sale_maximum_quantity": 0,
"sale_label": "string",
"sale_minimum_quantity": 0,
"inventory": 45,
"unit_of_measure": "EACH",
"unit_of_measure_quantity": 1,
"always_in_stock": true,
"shipping_rate_id": 2,
"address_id": 3,
"quantity_discount_id": 3,
"allow_backorders": true,
"lead_time_from": 7,
"lead_time_to": 15,
"lead_time_message": "15",
"price_discounts": [
{}
],
"add_ons": [
{}
],
"is_non_refundable": true,
"is_non_refundable_message": "string",
"length": 15,
"width": 7,
"height": 5,
"weight": 1500,
"classification": "string",
"unspsc_classification": "string",
"inventory_alert": 0,
"is_featured": true,
"price_visibility": "InheritFromProduct",
"login_for_pricing_message": "string",
"in_stock_message": "string",
"out_of_stock_message": "string",
"request_quote": true
}';
const headers = {
'Content-Type':'application/json',
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/SKUs',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/api/v1/SKUs',
params: {
}, headers: headers
p JSON.parse(result)
POST /api/v1/SKUs
Body parameter
{
"client_identifier": "string",
"library_product_id": 1188203,
"store_product_id": 1188203,
"sku_identifier": "PDA111-1",
"manufacturer_part_number": "PDA111-1",
"short_description": "string",
"description": "",
"list_price": 75.99,
"sale_price": 45.99,
"is_on_sale": true,
"sale_start_date": "2020-12-01T08:00:00.000Z",
"sale_end_date": "2020-12-31T21:00:00.000Z",
"sale_maximum_quantity": 0,
"sale_label": "string",
"sale_minimum_quantity": 0,
"inventory": 45,
"unit_of_measure": "EACH",
"unit_of_measure_quantity": 1,
"always_in_stock": true,
"shipping_rate_id": 2,
"address_id": 3,
"quantity_discount_id": 3,
"allow_backorders": true,
"lead_time_from": 7,
"lead_time_to": 15,
"lead_time_message": "15",
"price_discounts": [
{}
],
"add_ons": [
{}
],
"is_non_refundable": true,
"is_non_refundable_message": "string",
"length": 15,
"width": 7,
"height": 5,
"weight": 1500,
"classification": "string",
"unspsc_classification": "string",
"inventory_alert": 0,
"is_featured": true,
"price_visibility": "InheritFromProduct",
"login_for_pricing_message": "string",
"in_stock_message": "string",
"out_of_stock_message": "string",
"request_quote": true
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | SkuRequest | false | The SKU to be created. |
client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
library_product_id | body | integer (int64) ¦ null | false | Library Product identifier that the SKU is attached to. |
store_product_id | body | integer (int64) ¦ null | false | Store specific product identifier that the SKU is attached to. |
sku_identifier | body | string ¦ null | false | The unique SKU (stock keeping unit) of the inventory item. |
manufacturer_part_number | body | string ¦ null | false | The part number provided by the manufacturer. |
short_description | body | string ¦ null | false | A short description detailing the SKU. Useful for differentiating between other SKU's. |
description | body | string ¦ null | false | The full description of the SKU. |
list_price | body | number (double) ¦ null | false | The SKU's price displayed when not on sale. |
sale_price | body | number (double) ¦ null | false | The SKU's price displayed when it is on sale. |
is_on_sale | body | boolean ¦ null | false | Turn the sale price of the product on if all criteria are met. |
sale_start_date | body | string (date-time) ¦ null | false | The UTC date and time when a SKU's sale price takes effect. |
sale_end_date | body | string (date-time) ¦ null | false | The UTC date and time when a sku's sale price ends. |
sale_maximum_quantity | body | integer (int32) ¦ null | false | The maximum number of sale items a customer can buy at a time. |
sale_label | body | string ¦ null | false | The message displayed when an item is on sale. For example, Clearance, Limited Time Only, While Supplies Last, Open Box. |
sale_minimum_quantity | body | integer (int32) ¦ null | false | The minimum number of sale items a customer can buy at a time. |
inventory | body | number (double) ¦ null | false | The amount of inventory available for purchase. |
unit_of_measure | body | string ¦ null | false | The unit of measurement of the SKU |
unit_of_measure_quantity | body | number (double) ¦ null | false | The number of units belonging to the Unit of Measure |
always_in_stock | body | boolean ¦ null | false | The SKU will always be display as in stock to the customer. |
shipping_rate_id | body | integer (int64) ¦ null | false | Shipping rate the SKU is attached to. |
address_id | body | integer (int64) ¦ null | false | Address the SKU is attached to. |
quantity_discount_id | body | integer (int64) ¦ null | false | Quantity Discount the SKU is attached to. |
allow_backorders | body | boolean ¦ null | false | When the SKU is out of stock, allow the customer to purchase. |
lead_time_from | body | integer (int32) ¦ null | false | The minimum amount of time (in days), when the SKU is out of stock, that the SKU will take to ship. |
lead_time_to | body | integer (int32) ¦ null | false | The maximum amount of time (in days), when the SKU is out of stock, that the SKU will take to ship. |
lead_time_message | body | string ¦ null | false | A custom message that will be used to show customers lead times instead of the automatically generated message. |
price_discounts | body | [PriceDiscountRequest] ¦ null | false | The discounts for customers attached to accounts. |
» id | body | integer (int64) | false | The ID associated with the Discount. |
» client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
» name | body | string ¦ null | false | The name of the discount level. |
» discount_level_id | body | integer (int64) | false | The ID of the DiscountLevel that the Discount is attached to. |
» percent_discount | body | number (double) ¦ null | false | The discount percentage. This must be a value from 0 to 100. |
add_ons | body | [AddOnRequest] ¦ null | false | The add-ons that are available for the sku. |
» id | body | integer (int64) | false | The ID associated with the Add-On. |
» client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
» name | body | string ¦ null | false | The name of the discount level. |
is_non_refundable | body | boolean ¦ null | false | Displays a message to the customer that the SKU is non-refundable at time of purchase. |
is_non_refundable_message | body | string ¦ null | false | Displays a custom message to the customer that the SKU is non-refundable at time of purchase. |
length | body | number (double) ¦ null | false | The length of the SKU in cm |
width | body | number (double) ¦ null | false | The width of the SKU in cm |
height | body | number (double) ¦ null | false | The height of the SKU in cm |
weight | body | number (double) ¦ null | false | The weight of the SKU in kg |
classification | body | string ¦ null | false | The ABC classisfication of the SKU |
unspsc_classification | body | string ¦ null | false | The UNSPSC classisfication of the SKU |
inventory_alert | body | integer (int32) ¦ null | false | The amount when you want to be notified when the SKU's inventory drops below. |
is_featured | body | boolean ¦ null | false | This SKU will show higher in the priority when set to True |
price_visibility | body | string | false | |
login_for_pricing_message | body | string ¦ null | false | Override the log in for price message with the provided message |
in_stock_message | body | string ¦ null | false | Override the in stock message with the provided message |
out_of_stock_message | body | string ¦ null | false | Override the out of stock message with the provided message |
request_quote | body | boolean ¦ null | false | Set's the item so that it can only be added to a quote, and not the shopping cart. Inventory and pricing will still show. |
Detailed descriptions
is_on_sale: Turn the sale price of the product on if all criteria are met. - Sale price less than list price - Sale start date empty or less than today - Sale end date empty or greater than today
price_visibility:
Enumerated Values
Parameter | Value |
---|---|
price_visibility | InheritFromProduct |
price_visibility | ShowPricingToAllCustomers |
price_visibility | ShowPricingToOnlyAccountCustomers |
price_visibility | ShowPricingToOnlyLoggedInCustomers |
price_visibility | HidePricingToAllCustomers |
Example responses
200 Response
{"id":99089,"object":"sku","client_identifier":"string","store_product_id":1188203,"library_product_id":1188203,"product":{"id":4245,"library_product_id":4245,"object":"product","client_identifier":"string","name":"WX Series Explosion-Proof Gas Catalytic Heater","short_name":"WX Series","short_description":"WX Series Infrared Gas Catalytic Explosion-Proof Heaters.","primary_image":"https://productimage.com/image.png","brand_id":124483,"brand":{},"quantity_discount_id":124483,"quantity_discount":{},"created_on":"2019-08-24T14:15:22Z","url":"https://domain.com/product/x1D"},"brand":{"client_identifier":"","name":"Brand Name","alias":"Brand Alias","id":92590,"object":"brand","created_on":"2020-12-01T08:00:00.000Z"},"sku_identifier":"PDA111-1","manufacturer_part_number":"PDA111-1","short_description":"string","description":"","list_price":75.99,"sale_price":45.99,"is_on_sale":true,"sale_start_date":"2020-12-01T08:00:00.000Z","sale_end_date":"2020-12-31T21:00:00.000Z","sale_maximum_quantity":0,"sale_minimum_quantity":0,"sale_label":"string","inventory":45,"unit_of_measure":"EACH","unit_of_measure_quantity":1,"inventory_alert":0,"is_featured":true,"always_in_stock":true,"shipping_rate_id":2,"shipping_rate":{"id":4,"object":"shippingrate","client_identifier":"string","name":"Heavy Items","shipping_economy":9.99,"shipping_economy_additional":5.99,"is_free_shipping":false,"economy_days_from":5,"economy_days_to":7,"shipping_priority":9.99,"shipping_priority_additional":5.99,"is_free_shipping_priority":false,"priority_days_from":1,"priority_days_to":3,"international_shipping_economy":9.99,"international_shipping_economy_additional":6.99,"is_free_international_shipping":false,"international_economy_days_from":7,"international_economy_days_to":30,"international_shipping_priority":9.99,"international_shipping_priority_additional":6.99,"is_free_international_shipping_priority":false,"international_priority_days_from":1,"international_priority_days_to":3,"is_default":false,"notes":""},"address_id":3,"address":{"client_identifier":"string","id":8,"object":"address","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","first_name":"string","last_name":"string","company_name":"string","city":"Main Office","state_code":"TX","country_code":"US","street1":"915 W Dallas St","street2":"Unit 112","postal_code":"77019","phone_number":"+1 713-123-1234","is_primary":true,"is_warehouse":true},"quantity_discount_id":3,"quantity_discount":{"client_identifier":"string","id":8,"object":"QuantityDiscount","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","is_active":true,"combine_with_other_products_using_same_discount":true,"apply_to_sale_price":true,"show_percentage_off":true,"show_product_discounts":true,"show_sku_discounts":true,"calculation":"OverrideDiscountLevelPercentDiscount","tiers":[],"discount_levels":[]},"allow_backorders":true,"lead_time_from":7,"lead_time_to":15,"lead_time_message":"15","price_discounts":[{}],"is_non_refundable":true,"is_non_refundable_message":"string","length":15,"width":7,"height":5,"weight":1500,"classification":"string","unspsc_classification":"string","price_visibility":"InheritFromProduct","created_on":"2020-12-01T08:00:00.000Z","modified_on":"2020-12-01T08:00:00.000Z","login_for_pricing_message":"string","in_stock_message":"string","out_of_stock_message":"string","request_quote":true}
{
"id": 99089,
"object": "sku",
"client_identifier": "string",
"store_product_id": 1188203,
"library_product_id": 1188203,
"product": {
"id": 4245,
"library_product_id": 4245,
"object": "product",
"client_identifier": "string",
"name": "WX Series Explosion-Proof Gas Catalytic Heater",
"short_name": "WX Series",
"short_description": "WX Series Infrared Gas Catalytic Explosion-Proof Heaters.",
"primary_image": "https://productimage.com/image.png",
"brand_id": 124483,
"brand": {},
"quantity_discount_id": 124483,
"quantity_discount": {},
"created_on": "2019-08-24T14:15:22Z",
"url": "https://domain.com/product/x1D"
},
"brand": {
"client_identifier": "",
"name": "Brand Name",
"alias": "Brand Alias",
"id": 92590,
"object": "brand",
"created_on": "2020-12-01T08:00:00.000Z"
},
"sku_identifier": "PDA111-1",
"manufacturer_part_number": "PDA111-1",
"short_description": "string",
"description": "",
"list_price": 75.99,
"sale_price": 45.99,
"is_on_sale": true,
"sale_start_date": "2020-12-01T08:00:00.000Z",
"sale_end_date": "2020-12-31T21:00:00.000Z",
"sale_maximum_quantity": 0,
"sale_minimum_quantity": 0,
"sale_label": "string",
"inventory": 45,
"unit_of_measure": "EACH",
"unit_of_measure_quantity": 1,
"inventory_alert": 0,
"is_featured": true,
"always_in_stock": true,
"shipping_rate_id": 2,
"shipping_rate": {
"id": 4,
"object": "shippingrate",
"client_identifier": "string",
"name": "Heavy Items",
"shipping_economy": 9.99,
"shipping_economy_additional": 5.99,
"is_free_shipping": false,
"economy_days_from": 5,
"economy_days_to": 7,
"shipping_priority": 9.99,
"shipping_priority_additional": 5.99,
"is_free_shipping_priority": false,
"priority_days_from": 1,
"priority_days_to": 3,
"international_shipping_economy": 9.99,
"international_shipping_economy_additional": 6.99,
"is_free_international_shipping": false,
"international_economy_days_from": 7,
"international_economy_days_to": 30,
"international_shipping_priority": 9.99,
"international_shipping_priority_additional": 6.99,
"is_free_international_shipping_priority": false,
"international_priority_days_from": 1,
"international_priority_days_to": 3,
"is_default": false,
"notes": ""
},
"address_id": 3,
"address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"quantity_discount_id": 3,
"quantity_discount": {
"client_identifier": "string",
"id": 8,
"object": "QuantityDiscount",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"is_active": true,
"combine_with_other_products_using_same_discount": true,
"apply_to_sale_price": true,
"show_percentage_off": true,
"show_product_discounts": true,
"show_sku_discounts": true,
"calculation": "OverrideDiscountLevelPercentDiscount",
"tiers": [],
"discount_levels": []
},
"allow_backorders": true,
"lead_time_from": 7,
"lead_time_to": 15,
"lead_time_message": "15",
"price_discounts": [
{}
],
"is_non_refundable": true,
"is_non_refundable_message": "string",
"length": 15,
"width": 7,
"height": 5,
"weight": 1500,
"classification": "string",
"unspsc_classification": "string",
"price_visibility": "InheritFromProduct",
"created_on": "2020-12-01T08:00:00.000Z",
"modified_on": "2020-12-01T08:00:00.000Z",
"login_for_pricing_message": "string",
"in_stock_message": "string",
"out_of_stock_message": "string",
"request_quote": true
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | SKU was successfully created. | Sku |
400 | Bad Request | SKU could not be created. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Retrieve a SKU
Code samples
# You can also use wget
curl -X GET /api/v1/SKUs/{id} \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api/v1/SKUs/{id}";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/v1/SKUs/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/api/v1/SKUs/{id}', headers = headers)
print(r.json())
const headers = {
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/SKUs/{id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/api/v1/SKUs/{id}',
params: {
}, headers: headers
p JSON.parse(result)
GET /api/v1/SKUs/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the SKU being requested. |
Expand | query | array[string] | false | Array of strings for child properties to expand. |
Example responses
200 Response
{"id":99089,"object":"sku","client_identifier":"string","store_product_id":1188203,"library_product_id":1188203,"product":{"id":4245,"library_product_id":4245,"object":"product","client_identifier":"string","name":"WX Series Explosion-Proof Gas Catalytic Heater","short_name":"WX Series","short_description":"WX Series Infrared Gas Catalytic Explosion-Proof Heaters.","primary_image":"https://productimage.com/image.png","brand_id":124483,"brand":{},"quantity_discount_id":124483,"quantity_discount":{},"created_on":"2019-08-24T14:15:22Z","url":"https://domain.com/product/x1D"},"brand":{"client_identifier":"","name":"Brand Name","alias":"Brand Alias","id":92590,"object":"brand","created_on":"2020-12-01T08:00:00.000Z"},"sku_identifier":"PDA111-1","manufacturer_part_number":"PDA111-1","short_description":"string","description":"","list_price":75.99,"sale_price":45.99,"is_on_sale":true,"sale_start_date":"2020-12-01T08:00:00.000Z","sale_end_date":"2020-12-31T21:00:00.000Z","sale_maximum_quantity":0,"sale_minimum_quantity":0,"sale_label":"string","inventory":45,"unit_of_measure":"EACH","unit_of_measure_quantity":1,"inventory_alert":0,"is_featured":true,"always_in_stock":true,"shipping_rate_id":2,"shipping_rate":{"id":4,"object":"shippingrate","client_identifier":"string","name":"Heavy Items","shipping_economy":9.99,"shipping_economy_additional":5.99,"is_free_shipping":false,"economy_days_from":5,"economy_days_to":7,"shipping_priority":9.99,"shipping_priority_additional":5.99,"is_free_shipping_priority":false,"priority_days_from":1,"priority_days_to":3,"international_shipping_economy":9.99,"international_shipping_economy_additional":6.99,"is_free_international_shipping":false,"international_economy_days_from":7,"international_economy_days_to":30,"international_shipping_priority":9.99,"international_shipping_priority_additional":6.99,"is_free_international_shipping_priority":false,"international_priority_days_from":1,"international_priority_days_to":3,"is_default":false,"notes":""},"address_id":3,"address":{"client_identifier":"string","id":8,"object":"address","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","first_name":"string","last_name":"string","company_name":"string","city":"Main Office","state_code":"TX","country_code":"US","street1":"915 W Dallas St","street2":"Unit 112","postal_code":"77019","phone_number":"+1 713-123-1234","is_primary":true,"is_warehouse":true},"quantity_discount_id":3,"quantity_discount":{"client_identifier":"string","id":8,"object":"QuantityDiscount","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","is_active":true,"combine_with_other_products_using_same_discount":true,"apply_to_sale_price":true,"show_percentage_off":true,"show_product_discounts":true,"show_sku_discounts":true,"calculation":"OverrideDiscountLevelPercentDiscount","tiers":[],"discount_levels":[]},"allow_backorders":true,"lead_time_from":7,"lead_time_to":15,"lead_time_message":"15","price_discounts":[{}],"is_non_refundable":true,"is_non_refundable_message":"string","length":15,"width":7,"height":5,"weight":1500,"classification":"string","unspsc_classification":"string","price_visibility":"InheritFromProduct","created_on":"2020-12-01T08:00:00.000Z","modified_on":"2020-12-01T08:00:00.000Z","login_for_pricing_message":"string","in_stock_message":"string","out_of_stock_message":"string","request_quote":true}
{
"id": 99089,
"object": "sku",
"client_identifier": "string",
"store_product_id": 1188203,
"library_product_id": 1188203,
"product": {
"id": 4245,
"library_product_id": 4245,
"object": "product",
"client_identifier": "string",
"name": "WX Series Explosion-Proof Gas Catalytic Heater",
"short_name": "WX Series",
"short_description": "WX Series Infrared Gas Catalytic Explosion-Proof Heaters.",
"primary_image": "https://productimage.com/image.png",
"brand_id": 124483,
"brand": {},
"quantity_discount_id": 124483,
"quantity_discount": {},
"created_on": "2019-08-24T14:15:22Z",
"url": "https://domain.com/product/x1D"
},
"brand": {
"client_identifier": "",
"name": "Brand Name",
"alias": "Brand Alias",
"id": 92590,
"object": "brand",
"created_on": "2020-12-01T08:00:00.000Z"
},
"sku_identifier": "PDA111-1",
"manufacturer_part_number": "PDA111-1",
"short_description": "string",
"description": "",
"list_price": 75.99,
"sale_price": 45.99,
"is_on_sale": true,
"sale_start_date": "2020-12-01T08:00:00.000Z",
"sale_end_date": "2020-12-31T21:00:00.000Z",
"sale_maximum_quantity": 0,
"sale_minimum_quantity": 0,
"sale_label": "string",
"inventory": 45,
"unit_of_measure": "EACH",
"unit_of_measure_quantity": 1,
"inventory_alert": 0,
"is_featured": true,
"always_in_stock": true,
"shipping_rate_id": 2,
"shipping_rate": {
"id": 4,
"object": "shippingrate",
"client_identifier": "string",
"name": "Heavy Items",
"shipping_economy": 9.99,
"shipping_economy_additional": 5.99,
"is_free_shipping": false,
"economy_days_from": 5,
"economy_days_to": 7,
"shipping_priority": 9.99,
"shipping_priority_additional": 5.99,
"is_free_shipping_priority": false,
"priority_days_from": 1,
"priority_days_to": 3,
"international_shipping_economy": 9.99,
"international_shipping_economy_additional": 6.99,
"is_free_international_shipping": false,
"international_economy_days_from": 7,
"international_economy_days_to": 30,
"international_shipping_priority": 9.99,
"international_shipping_priority_additional": 6.99,
"is_free_international_shipping_priority": false,
"international_priority_days_from": 1,
"international_priority_days_to": 3,
"is_default": false,
"notes": ""
},
"address_id": 3,
"address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"quantity_discount_id": 3,
"quantity_discount": {
"client_identifier": "string",
"id": 8,
"object": "QuantityDiscount",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"is_active": true,
"combine_with_other_products_using_same_discount": true,
"apply_to_sale_price": true,
"show_percentage_off": true,
"show_product_discounts": true,
"show_sku_discounts": true,
"calculation": "OverrideDiscountLevelPercentDiscount",
"tiers": [],
"discount_levels": []
},
"allow_backorders": true,
"lead_time_from": 7,
"lead_time_to": 15,
"lead_time_message": "15",
"price_discounts": [
{}
],
"is_non_refundable": true,
"is_non_refundable_message": "string",
"length": 15,
"width": 7,
"height": 5,
"weight": 1500,
"classification": "string",
"unspsc_classification": "string",
"price_visibility": "InheritFromProduct",
"created_on": "2020-12-01T08:00:00.000Z",
"modified_on": "2020-12-01T08:00:00.000Z",
"login_for_pricing_message": "string",
"in_stock_message": "string",
"out_of_stock_message": "string",
"request_quote": true
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | SKU successfully retrieved. | Sku |
400 | Bad Request | SKU could not be retrieved. More details about the problem can be found in the errors list in the response. | ValidationProblemDetails |
401 | Unauthorized | Request is unauthorized. | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
put_api_v1_SKUs{id}
Code samples
# You can also use wget
curl -X PUT /api/v1/SKUs/{id} \
-H 'Content-Type: application/json' \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePutRequest()
{
int id = 1;
string url = "/api/v1/SKUs/{id}";
string json = @"{
""client_identifier"": ""string"",
""library_product_id"": 1188203,
""store_product_id"": 1188203,
""sku_identifier"": ""PDA111-1"",
""manufacturer_part_number"": ""PDA111-1"",
""short_description"": ""string"",
""description"": """",
""list_price"": 75.99,
""sale_price"": 45.99,
""is_on_sale"": true,
""sale_start_date"": ""2020-12-01T08:00:00.000Z"",
""sale_end_date"": ""2020-12-31T21:00:00.000Z"",
""sale_maximum_quantity"": 0,
""sale_label"": ""string"",
""sale_minimum_quantity"": 0,
""inventory"": 45,
""unit_of_measure"": ""EACH"",
""unit_of_measure_quantity"": 1,
""always_in_stock"": true,
""shipping_rate_id"": 2,
""address_id"": 3,
""quantity_discount_id"": 3,
""allow_backorders"": true,
""lead_time_from"": 7,
""lead_time_to"": 15,
""lead_time_message"": ""15"",
""price_discounts"": [
{}
],
""add_ons"": [
{}
],
""is_non_refundable"": true,
""is_non_refundable_message"": ""string"",
""length"": 15,
""width"": 7,
""height"": 5,
""weight"": 1500,
""classification"": ""string"",
""unspsc_classification"": ""string"",
""inventory_alert"": 0,
""is_featured"": true,
""price_visibility"": ""InheritFromProduct"",
""login_for_pricing_message"": ""string"",
""in_stock_message"": ""string"",
""out_of_stock_message"": ""string"",
""request_quote"": true
}";
SkuRequest content = JsonConvert.DeserializeObject(json);
var result = await PutAsync(id, content, url);
}
/// Performs a PUT Request
public async Task PutAsync(int id, SkuRequest content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute PUT request
HttpResponseMessage response = await Client.PutAsync(url + $"/{id}", jsonContent);
//Return response
return await DeserializeObject(response);
}
/// Serialize an object to Json
private StringContent SerializeObject(SkuRequest content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','/api/v1/SKUs/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.put('/api/v1/SKUs/{id}', headers = headers)
print(r.json())
const inputBody = '{
"client_identifier": "string",
"library_product_id": 1188203,
"store_product_id": 1188203,
"sku_identifier": "PDA111-1",
"manufacturer_part_number": "PDA111-1",
"short_description": "string",
"description": "",
"list_price": 75.99,
"sale_price": 45.99,
"is_on_sale": true,
"sale_start_date": "2020-12-01T08:00:00.000Z",
"sale_end_date": "2020-12-31T21:00:00.000Z",
"sale_maximum_quantity": 0,
"sale_label": "string",
"sale_minimum_quantity": 0,
"inventory": 45,
"unit_of_measure": "EACH",
"unit_of_measure_quantity": 1,
"always_in_stock": true,
"shipping_rate_id": 2,
"address_id": 3,
"quantity_discount_id": 3,
"allow_backorders": true,
"lead_time_from": 7,
"lead_time_to": 15,
"lead_time_message": "15",
"price_discounts": [
{}
],
"add_ons": [
{}
],
"is_non_refundable": true,
"is_non_refundable_message": "string",
"length": 15,
"width": 7,
"height": 5,
"weight": 1500,
"classification": "string",
"unspsc_classification": "string",
"inventory_alert": 0,
"is_featured": true,
"price_visibility": "InheritFromProduct",
"login_for_pricing_message": "string",
"in_stock_message": "string",
"out_of_stock_message": "string",
"request_quote": true
}';
const headers = {
'Content-Type':'application/json',
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/SKUs/{id}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.put '/api/v1/SKUs/{id}',
params: {
}, headers: headers
p JSON.parse(result)
PUT /api/v1/SKUs/{id}
Body parameter
{
"client_identifier": "string",
"library_product_id": 1188203,
"store_product_id": 1188203,
"sku_identifier": "PDA111-1",
"manufacturer_part_number": "PDA111-1",
"short_description": "string",
"description": "",
"list_price": 75.99,
"sale_price": 45.99,
"is_on_sale": true,
"sale_start_date": "2020-12-01T08:00:00.000Z",
"sale_end_date": "2020-12-31T21:00:00.000Z",
"sale_maximum_quantity": 0,
"sale_label": "string",
"sale_minimum_quantity": 0,
"inventory": 45,
"unit_of_measure": "EACH",
"unit_of_measure_quantity": 1,
"always_in_stock": true,
"shipping_rate_id": 2,
"address_id": 3,
"quantity_discount_id": 3,
"allow_backorders": true,
"lead_time_from": 7,
"lead_time_to": 15,
"lead_time_message": "15",
"price_discounts": [
{}
],
"add_ons": [
{}
],
"is_non_refundable": true,
"is_non_refundable_message": "string",
"length": 15,
"width": 7,
"height": 5,
"weight": 1500,
"classification": "string",
"unspsc_classification": "string",
"inventory_alert": 0,
"is_featured": true,
"price_visibility": "InheritFromProduct",
"login_for_pricing_message": "string",
"in_stock_message": "string",
"out_of_stock_message": "string",
"request_quote": true
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | none |
updateNullValues | query | boolean | false | none |
body | body | SkuRequest | false | none |
client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
library_product_id | body | integer (int64) ¦ null | false | Library Product identifier that the SKU is attached to. |
store_product_id | body | integer (int64) ¦ null | false | Store specific product identifier that the SKU is attached to. |
sku_identifier | body | string ¦ null | false | The unique SKU (stock keeping unit) of the inventory item. |
manufacturer_part_number | body | string ¦ null | false | The part number provided by the manufacturer. |
short_description | body | string ¦ null | false | A short description detailing the SKU. Useful for differentiating between other SKU's. |
description | body | string ¦ null | false | The full description of the SKU. |
list_price | body | number (double) ¦ null | false | The SKU's price displayed when not on sale. |
sale_price | body | number (double) ¦ null | false | The SKU's price displayed when it is on sale. |
is_on_sale | body | boolean ¦ null | false | Turn the sale price of the product on if all criteria are met. |
sale_start_date | body | string (date-time) ¦ null | false | The UTC date and time when a SKU's sale price takes effect. |
sale_end_date | body | string (date-time) ¦ null | false | The UTC date and time when a sku's sale price ends. |
sale_maximum_quantity | body | integer (int32) ¦ null | false | The maximum number of sale items a customer can buy at a time. |
sale_label | body | string ¦ null | false | The message displayed when an item is on sale. For example, Clearance, Limited Time Only, While Supplies Last, Open Box. |
sale_minimum_quantity | body | integer (int32) ¦ null | false | The minimum number of sale items a customer can buy at a time. |
inventory | body | number (double) ¦ null | false | The amount of inventory available for purchase. |
unit_of_measure | body | string ¦ null | false | The unit of measurement of the SKU |
unit_of_measure_quantity | body | number (double) ¦ null | false | The number of units belonging to the Unit of Measure |
always_in_stock | body | boolean ¦ null | false | The SKU will always be display as in stock to the customer. |
shipping_rate_id | body | integer (int64) ¦ null | false | Shipping rate the SKU is attached to. |
address_id | body | integer (int64) ¦ null | false | Address the SKU is attached to. |
quantity_discount_id | body | integer (int64) ¦ null | false | Quantity Discount the SKU is attached to. |
allow_backorders | body | boolean ¦ null | false | When the SKU is out of stock, allow the customer to purchase. |
lead_time_from | body | integer (int32) ¦ null | false | The minimum amount of time (in days), when the SKU is out of stock, that the SKU will take to ship. |
lead_time_to | body | integer (int32) ¦ null | false | The maximum amount of time (in days), when the SKU is out of stock, that the SKU will take to ship. |
lead_time_message | body | string ¦ null | false | A custom message that will be used to show customers lead times instead of the automatically generated message. |
price_discounts | body | [PriceDiscountRequest] ¦ null | false | The discounts for customers attached to accounts. |
» id | body | integer (int64) | false | The ID associated with the Discount. |
» client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
» name | body | string ¦ null | false | The name of the discount level. |
» discount_level_id | body | integer (int64) | false | The ID of the DiscountLevel that the Discount is attached to. |
» percent_discount | body | number (double) ¦ null | false | The discount percentage. This must be a value from 0 to 100. |
add_ons | body | [AddOnRequest] ¦ null | false | The add-ons that are available for the sku. |
» id | body | integer (int64) | false | The ID associated with the Add-On. |
» client_identifier | body | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
» name | body | string ¦ null | false | The name of the discount level. |
is_non_refundable | body | boolean ¦ null | false | Displays a message to the customer that the SKU is non-refundable at time of purchase. |
is_non_refundable_message | body | string ¦ null | false | Displays a custom message to the customer that the SKU is non-refundable at time of purchase. |
length | body | number (double) ¦ null | false | The length of the SKU in cm |
width | body | number (double) ¦ null | false | The width of the SKU in cm |
height | body | number (double) ¦ null | false | The height of the SKU in cm |
weight | body | number (double) ¦ null | false | The weight of the SKU in kg |
classification | body | string ¦ null | false | The ABC classisfication of the SKU |
unspsc_classification | body | string ¦ null | false | The UNSPSC classisfication of the SKU |
inventory_alert | body | integer (int32) ¦ null | false | The amount when you want to be notified when the SKU's inventory drops below. |
is_featured | body | boolean ¦ null | false | This SKU will show higher in the priority when set to True |
price_visibility | body | string | false | |
login_for_pricing_message | body | string ¦ null | false | Override the log in for price message with the provided message |
in_stock_message | body | string ¦ null | false | Override the in stock message with the provided message |
out_of_stock_message | body | string ¦ null | false | Override the out of stock message with the provided message |
request_quote | body | boolean ¦ null | false | Set's the item so that it can only be added to a quote, and not the shopping cart. Inventory and pricing will still show. |
Detailed descriptions
is_on_sale: Turn the sale price of the product on if all criteria are met. - Sale price less than list price - Sale start date empty or less than today - Sale end date empty or greater than today
price_visibility:
Enumerated Values
Parameter | Value |
---|---|
price_visibility | InheritFromProduct |
price_visibility | ShowPricingToAllCustomers |
price_visibility | ShowPricingToOnlyAccountCustomers |
price_visibility | ShowPricingToOnlyLoggedInCustomers |
price_visibility | HidePricingToAllCustomers |
Example responses
200 Response
{"id":99089,"object":"sku","client_identifier":"string","store_product_id":1188203,"library_product_id":1188203,"product":{"id":4245,"library_product_id":4245,"object":"product","client_identifier":"string","name":"WX Series Explosion-Proof Gas Catalytic Heater","short_name":"WX Series","short_description":"WX Series Infrared Gas Catalytic Explosion-Proof Heaters.","primary_image":"https://productimage.com/image.png","brand_id":124483,"brand":{},"quantity_discount_id":124483,"quantity_discount":{},"created_on":"2019-08-24T14:15:22Z","url":"https://domain.com/product/x1D"},"brand":{"client_identifier":"","name":"Brand Name","alias":"Brand Alias","id":92590,"object":"brand","created_on":"2020-12-01T08:00:00.000Z"},"sku_identifier":"PDA111-1","manufacturer_part_number":"PDA111-1","short_description":"string","description":"","list_price":75.99,"sale_price":45.99,"is_on_sale":true,"sale_start_date":"2020-12-01T08:00:00.000Z","sale_end_date":"2020-12-31T21:00:00.000Z","sale_maximum_quantity":0,"sale_minimum_quantity":0,"sale_label":"string","inventory":45,"unit_of_measure":"EACH","unit_of_measure_quantity":1,"inventory_alert":0,"is_featured":true,"always_in_stock":true,"shipping_rate_id":2,"shipping_rate":{"id":4,"object":"shippingrate","client_identifier":"string","name":"Heavy Items","shipping_economy":9.99,"shipping_economy_additional":5.99,"is_free_shipping":false,"economy_days_from":5,"economy_days_to":7,"shipping_priority":9.99,"shipping_priority_additional":5.99,"is_free_shipping_priority":false,"priority_days_from":1,"priority_days_to":3,"international_shipping_economy":9.99,"international_shipping_economy_additional":6.99,"is_free_international_shipping":false,"international_economy_days_from":7,"international_economy_days_to":30,"international_shipping_priority":9.99,"international_shipping_priority_additional":6.99,"is_free_international_shipping_priority":false,"international_priority_days_from":1,"international_priority_days_to":3,"is_default":false,"notes":""},"address_id":3,"address":{"client_identifier":"string","id":8,"object":"address","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","first_name":"string","last_name":"string","company_name":"string","city":"Main Office","state_code":"TX","country_code":"US","street1":"915 W Dallas St","street2":"Unit 112","postal_code":"77019","phone_number":"+1 713-123-1234","is_primary":true,"is_warehouse":true},"quantity_discount_id":3,"quantity_discount":{"client_identifier":"string","id":8,"object":"QuantityDiscount","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","is_active":true,"combine_with_other_products_using_same_discount":true,"apply_to_sale_price":true,"show_percentage_off":true,"show_product_discounts":true,"show_sku_discounts":true,"calculation":"OverrideDiscountLevelPercentDiscount","tiers":[],"discount_levels":[]},"allow_backorders":true,"lead_time_from":7,"lead_time_to":15,"lead_time_message":"15","price_discounts":[{}],"is_non_refundable":true,"is_non_refundable_message":"string","length":15,"width":7,"height":5,"weight":1500,"classification":"string","unspsc_classification":"string","price_visibility":"InheritFromProduct","created_on":"2020-12-01T08:00:00.000Z","modified_on":"2020-12-01T08:00:00.000Z","login_for_pricing_message":"string","in_stock_message":"string","out_of_stock_message":"string","request_quote":true}
{
"id": 99089,
"object": "sku",
"client_identifier": "string",
"store_product_id": 1188203,
"library_product_id": 1188203,
"product": {
"id": 4245,
"library_product_id": 4245,
"object": "product",
"client_identifier": "string",
"name": "WX Series Explosion-Proof Gas Catalytic Heater",
"short_name": "WX Series",
"short_description": "WX Series Infrared Gas Catalytic Explosion-Proof Heaters.",
"primary_image": "https://productimage.com/image.png",
"brand_id": 124483,
"brand": {},
"quantity_discount_id": 124483,
"quantity_discount": {},
"created_on": "2019-08-24T14:15:22Z",
"url": "https://domain.com/product/x1D"
},
"brand": {
"client_identifier": "",
"name": "Brand Name",
"alias": "Brand Alias",
"id": 92590,
"object": "brand",
"created_on": "2020-12-01T08:00:00.000Z"
},
"sku_identifier": "PDA111-1",
"manufacturer_part_number": "PDA111-1",
"short_description": "string",
"description": "",
"list_price": 75.99,
"sale_price": 45.99,
"is_on_sale": true,
"sale_start_date": "2020-12-01T08:00:00.000Z",
"sale_end_date": "2020-12-31T21:00:00.000Z",
"sale_maximum_quantity": 0,
"sale_minimum_quantity": 0,
"sale_label": "string",
"inventory": 45,
"unit_of_measure": "EACH",
"unit_of_measure_quantity": 1,
"inventory_alert": 0,
"is_featured": true,
"always_in_stock": true,
"shipping_rate_id": 2,
"shipping_rate": {
"id": 4,
"object": "shippingrate",
"client_identifier": "string",
"name": "Heavy Items",
"shipping_economy": 9.99,
"shipping_economy_additional": 5.99,
"is_free_shipping": false,
"economy_days_from": 5,
"economy_days_to": 7,
"shipping_priority": 9.99,
"shipping_priority_additional": 5.99,
"is_free_shipping_priority": false,
"priority_days_from": 1,
"priority_days_to": 3,
"international_shipping_economy": 9.99,
"international_shipping_economy_additional": 6.99,
"is_free_international_shipping": false,
"international_economy_days_from": 7,
"international_economy_days_to": 30,
"international_shipping_priority": 9.99,
"international_shipping_priority_additional": 6.99,
"is_free_international_shipping_priority": false,
"international_priority_days_from": 1,
"international_priority_days_to": 3,
"is_default": false,
"notes": ""
},
"address_id": 3,
"address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"quantity_discount_id": 3,
"quantity_discount": {
"client_identifier": "string",
"id": 8,
"object": "QuantityDiscount",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"is_active": true,
"combine_with_other_products_using_same_discount": true,
"apply_to_sale_price": true,
"show_percentage_off": true,
"show_product_discounts": true,
"show_sku_discounts": true,
"calculation": "OverrideDiscountLevelPercentDiscount",
"tiers": [],
"discount_levels": []
},
"allow_backorders": true,
"lead_time_from": 7,
"lead_time_to": 15,
"lead_time_message": "15",
"price_discounts": [
{}
],
"is_non_refundable": true,
"is_non_refundable_message": "string",
"length": 15,
"width": 7,
"height": 5,
"weight": 1500,
"classification": "string",
"unspsc_classification": "string",
"price_visibility": "InheritFromProduct",
"created_on": "2020-12-01T08:00:00.000Z",
"modified_on": "2020-12-01T08:00:00.000Z",
"login_for_pricing_message": "string",
"in_stock_message": "string",
"out_of_stock_message": "string",
"request_quote": true
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Success | Sku |
400 | Bad Request | Bad Request | ValidationProblemDetails |
401 | Unauthorized | Unauthorized | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
Delete a SKU
Code samples
# You can also use wget
curl -X DELETE /api/v1/SKUs/{id} \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeDeleteRequest()
{
int id = 1;
string url = "/api/v1/SKUs/{id}";
await DeleteAsync(id, url);
}
/// Performs a DELETE Request
public async Task DeleteAsync(int id, string url)
{
//Execute DELETE request
HttpResponseMessage response = await Client.DeleteAsync(url + $"/{id}");
//Return response
await DeserializeObject(response);
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','/api/v1/SKUs/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.delete('/api/v1/SKUs/{id}', headers = headers)
print(r.json())
const headers = {
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/SKUs/{id}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.delete '/api/v1/SKUs/{id}',
params: {
}, headers: headers
p JSON.parse(result)
DELETE /api/v1/SKUs/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | Primary identifier of the SKU to delete |
Example responses
200 Response
{"id":99089,"object":"sku","client_identifier":"string","store_product_id":1188203,"library_product_id":1188203,"product":{"id":4245,"library_product_id":4245,"object":"product","client_identifier":"string","name":"WX Series Explosion-Proof Gas Catalytic Heater","short_name":"WX Series","short_description":"WX Series Infrared Gas Catalytic Explosion-Proof Heaters.","primary_image":"https://productimage.com/image.png","brand_id":124483,"brand":{},"quantity_discount_id":124483,"quantity_discount":{},"created_on":"2019-08-24T14:15:22Z","url":"https://domain.com/product/x1D"},"brand":{"client_identifier":"","name":"Brand Name","alias":"Brand Alias","id":92590,"object":"brand","created_on":"2020-12-01T08:00:00.000Z"},"sku_identifier":"PDA111-1","manufacturer_part_number":"PDA111-1","short_description":"string","description":"","list_price":75.99,"sale_price":45.99,"is_on_sale":true,"sale_start_date":"2020-12-01T08:00:00.000Z","sale_end_date":"2020-12-31T21:00:00.000Z","sale_maximum_quantity":0,"sale_minimum_quantity":0,"sale_label":"string","inventory":45,"unit_of_measure":"EACH","unit_of_measure_quantity":1,"inventory_alert":0,"is_featured":true,"always_in_stock":true,"shipping_rate_id":2,"shipping_rate":{"id":4,"object":"shippingrate","client_identifier":"string","name":"Heavy Items","shipping_economy":9.99,"shipping_economy_additional":5.99,"is_free_shipping":false,"economy_days_from":5,"economy_days_to":7,"shipping_priority":9.99,"shipping_priority_additional":5.99,"is_free_shipping_priority":false,"priority_days_from":1,"priority_days_to":3,"international_shipping_economy":9.99,"international_shipping_economy_additional":6.99,"is_free_international_shipping":false,"international_economy_days_from":7,"international_economy_days_to":30,"international_shipping_priority":9.99,"international_shipping_priority_additional":6.99,"is_free_international_shipping_priority":false,"international_priority_days_from":1,"international_priority_days_to":3,"is_default":false,"notes":""},"address_id":3,"address":{"client_identifier":"string","id":8,"object":"address","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","first_name":"string","last_name":"string","company_name":"string","city":"Main Office","state_code":"TX","country_code":"US","street1":"915 W Dallas St","street2":"Unit 112","postal_code":"77019","phone_number":"+1 713-123-1234","is_primary":true,"is_warehouse":true},"quantity_discount_id":3,"quantity_discount":{"client_identifier":"string","id":8,"object":"QuantityDiscount","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","is_active":true,"combine_with_other_products_using_same_discount":true,"apply_to_sale_price":true,"show_percentage_off":true,"show_product_discounts":true,"show_sku_discounts":true,"calculation":"OverrideDiscountLevelPercentDiscount","tiers":[],"discount_levels":[]},"allow_backorders":true,"lead_time_from":7,"lead_time_to":15,"lead_time_message":"15","price_discounts":[{}],"is_non_refundable":true,"is_non_refundable_message":"string","length":15,"width":7,"height":5,"weight":1500,"classification":"string","unspsc_classification":"string","price_visibility":"InheritFromProduct","created_on":"2020-12-01T08:00:00.000Z","modified_on":"2020-12-01T08:00:00.000Z","login_for_pricing_message":"string","in_stock_message":"string","out_of_stock_message":"string","request_quote":true}
{
"id": 99089,
"object": "sku",
"client_identifier": "string",
"store_product_id": 1188203,
"library_product_id": 1188203,
"product": {
"id": 4245,
"library_product_id": 4245,
"object": "product",
"client_identifier": "string",
"name": "WX Series Explosion-Proof Gas Catalytic Heater",
"short_name": "WX Series",
"short_description": "WX Series Infrared Gas Catalytic Explosion-Proof Heaters.",
"primary_image": "https://productimage.com/image.png",
"brand_id": 124483,
"brand": {},
"quantity_discount_id": 124483,
"quantity_discount": {},
"created_on": "2019-08-24T14:15:22Z",
"url": "https://domain.com/product/x1D"
},
"brand": {
"client_identifier": "",
"name": "Brand Name",
"alias": "Brand Alias",
"id": 92590,
"object": "brand",
"created_on": "2020-12-01T08:00:00.000Z"
},
"sku_identifier": "PDA111-1",
"manufacturer_part_number": "PDA111-1",
"short_description": "string",
"description": "",
"list_price": 75.99,
"sale_price": 45.99,
"is_on_sale": true,
"sale_start_date": "2020-12-01T08:00:00.000Z",
"sale_end_date": "2020-12-31T21:00:00.000Z",
"sale_maximum_quantity": 0,
"sale_minimum_quantity": 0,
"sale_label": "string",
"inventory": 45,
"unit_of_measure": "EACH",
"unit_of_measure_quantity": 1,
"inventory_alert": 0,
"is_featured": true,
"always_in_stock": true,
"shipping_rate_id": 2,
"shipping_rate": {
"id": 4,
"object": "shippingrate",
"client_identifier": "string",
"name": "Heavy Items",
"shipping_economy": 9.99,
"shipping_economy_additional": 5.99,
"is_free_shipping": false,
"economy_days_from": 5,
"economy_days_to": 7,
"shipping_priority": 9.99,
"shipping_priority_additional": 5.99,
"is_free_shipping_priority": false,
"priority_days_from": 1,
"priority_days_to": 3,
"international_shipping_economy": 9.99,
"international_shipping_economy_additional": 6.99,
"is_free_international_shipping": false,
"international_economy_days_from": 7,
"international_economy_days_to": 30,
"international_shipping_priority": 9.99,
"international_shipping_priority_additional": 6.99,
"is_free_international_shipping_priority": false,
"international_priority_days_from": 1,
"international_priority_days_to": 3,
"is_default": false,
"notes": ""
},
"address_id": 3,
"address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"quantity_discount_id": 3,
"quantity_discount": {
"client_identifier": "string",
"id": 8,
"object": "QuantityDiscount",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"is_active": true,
"combine_with_other_products_using_same_discount": true,
"apply_to_sale_price": true,
"show_percentage_off": true,
"show_product_discounts": true,
"show_sku_discounts": true,
"calculation": "OverrideDiscountLevelPercentDiscount",
"tiers": [],
"discount_levels": []
},
"allow_backorders": true,
"lead_time_from": 7,
"lead_time_to": 15,
"lead_time_message": "15",
"price_discounts": [
{}
],
"is_non_refundable": true,
"is_non_refundable_message": "string",
"length": 15,
"width": 7,
"height": 5,
"weight": 1500,
"classification": "string",
"unspsc_classification": "string",
"price_visibility": "InheritFromProduct",
"created_on": "2020-12-01T08:00:00.000Z",
"modified_on": "2020-12-01T08:00:00.000Z",
"login_for_pricing_message": "string",
"in_stock_message": "string",
"out_of_stock_message": "string",
"request_quote": true
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | SKU successfully deleted. | Sku |
400 | Bad Request | Bad Request | ValidationProblemDetails |
401 | Unauthorized | Unauthorized | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Adjust the inventory of a SKU
Use this to increment or decrement the inventory of a SKU. If the value given is positive, the inventory will incremented, otherwise it will be decremented.
Code samples
# You can also use wget
curl -X PUT /api/v1/SKUs/AdjustInventory/{id} \
-H 'Content-Type: application/json' \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePutRequest()
{
int id = 1;
string url = "/api/v1/SKUs/AdjustInventory/{id}";
string json = @"{
""inventory_adjustment"": 5
}";
SkuAdjustInventoryOptions content = JsonConvert.DeserializeObject(json);
var result = await PutAsync(id, content, url);
}
/// Performs a PUT Request
public async Task PutAsync(int id, SkuAdjustInventoryOptions content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute PUT request
HttpResponseMessage response = await Client.PutAsync(url + $"/{id}", jsonContent);
//Return response
return await DeserializeObject(response);
}
/// Serialize an object to Json
private StringContent SerializeObject(SkuAdjustInventoryOptions content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','/api/v1/SKUs/AdjustInventory/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.put('/api/v1/SKUs/AdjustInventory/{id}', headers = headers)
print(r.json())
const inputBody = '{
"inventory_adjustment": 5
}';
const headers = {
'Content-Type':'application/json',
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/SKUs/AdjustInventory/{id}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.put '/api/v1/SKUs/AdjustInventory/{id}',
params: {
}, headers: headers
p JSON.parse(result)
PUT /api/v1/SKUs/AdjustInventory/{id}
Body parameter
{
"inventory_adjustment": 5
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | Primary identifier of the SKU to update |
body | body | SkuAdjustInventoryOptions | false | SKU to update |
inventory_adjustment | body | number (double) | false | Adjust the inventory level by a value |
Example responses
200 Response
{"id":99089,"object":"sku","client_identifier":"string","store_product_id":1188203,"library_product_id":1188203,"product":{"id":4245,"library_product_id":4245,"object":"product","client_identifier":"string","name":"WX Series Explosion-Proof Gas Catalytic Heater","short_name":"WX Series","short_description":"WX Series Infrared Gas Catalytic Explosion-Proof Heaters.","primary_image":"https://productimage.com/image.png","brand_id":124483,"brand":{},"quantity_discount_id":124483,"quantity_discount":{},"created_on":"2019-08-24T14:15:22Z","url":"https://domain.com/product/x1D"},"brand":{"client_identifier":"","name":"Brand Name","alias":"Brand Alias","id":92590,"object":"brand","created_on":"2020-12-01T08:00:00.000Z"},"sku_identifier":"PDA111-1","manufacturer_part_number":"PDA111-1","short_description":"string","description":"","list_price":75.99,"sale_price":45.99,"is_on_sale":true,"sale_start_date":"2020-12-01T08:00:00.000Z","sale_end_date":"2020-12-31T21:00:00.000Z","sale_maximum_quantity":0,"sale_minimum_quantity":0,"sale_label":"string","inventory":45,"unit_of_measure":"EACH","unit_of_measure_quantity":1,"inventory_alert":0,"is_featured":true,"always_in_stock":true,"shipping_rate_id":2,"shipping_rate":{"id":4,"object":"shippingrate","client_identifier":"string","name":"Heavy Items","shipping_economy":9.99,"shipping_economy_additional":5.99,"is_free_shipping":false,"economy_days_from":5,"economy_days_to":7,"shipping_priority":9.99,"shipping_priority_additional":5.99,"is_free_shipping_priority":false,"priority_days_from":1,"priority_days_to":3,"international_shipping_economy":9.99,"international_shipping_economy_additional":6.99,"is_free_international_shipping":false,"international_economy_days_from":7,"international_economy_days_to":30,"international_shipping_priority":9.99,"international_shipping_priority_additional":6.99,"is_free_international_shipping_priority":false,"international_priority_days_from":1,"international_priority_days_to":3,"is_default":false,"notes":""},"address_id":3,"address":{"client_identifier":"string","id":8,"object":"address","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","first_name":"string","last_name":"string","company_name":"string","city":"Main Office","state_code":"TX","country_code":"US","street1":"915 W Dallas St","street2":"Unit 112","postal_code":"77019","phone_number":"+1 713-123-1234","is_primary":true,"is_warehouse":true},"quantity_discount_id":3,"quantity_discount":{"client_identifier":"string","id":8,"object":"QuantityDiscount","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","is_active":true,"combine_with_other_products_using_same_discount":true,"apply_to_sale_price":true,"show_percentage_off":true,"show_product_discounts":true,"show_sku_discounts":true,"calculation":"OverrideDiscountLevelPercentDiscount","tiers":[],"discount_levels":[]},"allow_backorders":true,"lead_time_from":7,"lead_time_to":15,"lead_time_message":"15","price_discounts":[{}],"is_non_refundable":true,"is_non_refundable_message":"string","length":15,"width":7,"height":5,"weight":1500,"classification":"string","unspsc_classification":"string","price_visibility":"InheritFromProduct","created_on":"2020-12-01T08:00:00.000Z","modified_on":"2020-12-01T08:00:00.000Z","login_for_pricing_message":"string","in_stock_message":"string","out_of_stock_message":"string","request_quote":true}
{
"id": 99089,
"object": "sku",
"client_identifier": "string",
"store_product_id": 1188203,
"library_product_id": 1188203,
"product": {
"id": 4245,
"library_product_id": 4245,
"object": "product",
"client_identifier": "string",
"name": "WX Series Explosion-Proof Gas Catalytic Heater",
"short_name": "WX Series",
"short_description": "WX Series Infrared Gas Catalytic Explosion-Proof Heaters.",
"primary_image": "https://productimage.com/image.png",
"brand_id": 124483,
"brand": {},
"quantity_discount_id": 124483,
"quantity_discount": {},
"created_on": "2019-08-24T14:15:22Z",
"url": "https://domain.com/product/x1D"
},
"brand": {
"client_identifier": "",
"name": "Brand Name",
"alias": "Brand Alias",
"id": 92590,
"object": "brand",
"created_on": "2020-12-01T08:00:00.000Z"
},
"sku_identifier": "PDA111-1",
"manufacturer_part_number": "PDA111-1",
"short_description": "string",
"description": "",
"list_price": 75.99,
"sale_price": 45.99,
"is_on_sale": true,
"sale_start_date": "2020-12-01T08:00:00.000Z",
"sale_end_date": "2020-12-31T21:00:00.000Z",
"sale_maximum_quantity": 0,
"sale_minimum_quantity": 0,
"sale_label": "string",
"inventory": 45,
"unit_of_measure": "EACH",
"unit_of_measure_quantity": 1,
"inventory_alert": 0,
"is_featured": true,
"always_in_stock": true,
"shipping_rate_id": 2,
"shipping_rate": {
"id": 4,
"object": "shippingrate",
"client_identifier": "string",
"name": "Heavy Items",
"shipping_economy": 9.99,
"shipping_economy_additional": 5.99,
"is_free_shipping": false,
"economy_days_from": 5,
"economy_days_to": 7,
"shipping_priority": 9.99,
"shipping_priority_additional": 5.99,
"is_free_shipping_priority": false,
"priority_days_from": 1,
"priority_days_to": 3,
"international_shipping_economy": 9.99,
"international_shipping_economy_additional": 6.99,
"is_free_international_shipping": false,
"international_economy_days_from": 7,
"international_economy_days_to": 30,
"international_shipping_priority": 9.99,
"international_shipping_priority_additional": 6.99,
"is_free_international_shipping_priority": false,
"international_priority_days_from": 1,
"international_priority_days_to": 3,
"is_default": false,
"notes": ""
},
"address_id": 3,
"address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"quantity_discount_id": 3,
"quantity_discount": {
"client_identifier": "string",
"id": 8,
"object": "QuantityDiscount",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"is_active": true,
"combine_with_other_products_using_same_discount": true,
"apply_to_sale_price": true,
"show_percentage_off": true,
"show_product_discounts": true,
"show_sku_discounts": true,
"calculation": "OverrideDiscountLevelPercentDiscount",
"tiers": [],
"discount_levels": []
},
"allow_backorders": true,
"lead_time_from": 7,
"lead_time_to": 15,
"lead_time_message": "15",
"price_discounts": [
{}
],
"is_non_refundable": true,
"is_non_refundable_message": "string",
"length": 15,
"width": 7,
"height": 5,
"weight": 1500,
"classification": "string",
"unspsc_classification": "string",
"price_visibility": "InheritFromProduct",
"created_on": "2020-12-01T08:00:00.000Z",
"modified_on": "2020-12-01T08:00:00.000Z",
"login_for_pricing_message": "string",
"in_stock_message": "string",
"out_of_stock_message": "string",
"request_quote": true
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | SKU successfully updated. | Sku |
400 | Bad Request | Bad Request | ValidationProblemDetails |
401 | Unauthorized | Unauthorized | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Update the inventory of a SKU
Use this to update the inventory of a SKU to a specific value.
Code samples
# You can also use wget
curl -X PUT /api/v1/SKUs/UpdateInventory/{id} \
-H 'Content-Type: application/json' \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePutRequest()
{
int id = 1;
string url = "/api/v1/SKUs/UpdateInventory/{id}";
string json = @"{
""inventory"": 45,
""unit_of_measure"": ""EACH"",
""unit_of_measure_quantity"": 1,
""allow_backorders"": true,
""always_in_stock"": true,
""lead_time_from"": 7,
""lead_time_to"": 15
}";
SkuUpdateInventoryOptions content = JsonConvert.DeserializeObject(json);
var result = await PutAsync(id, content, url);
}
/// Performs a PUT Request
public async Task PutAsync(int id, SkuUpdateInventoryOptions content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute PUT request
HttpResponseMessage response = await Client.PutAsync(url + $"/{id}", jsonContent);
//Return response
return await DeserializeObject(response);
}
/// Serialize an object to Json
private StringContent SerializeObject(SkuUpdateInventoryOptions content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','/api/v1/SKUs/UpdateInventory/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.put('/api/v1/SKUs/UpdateInventory/{id}', headers = headers)
print(r.json())
const inputBody = '{
"inventory": 45,
"unit_of_measure": "EACH",
"unit_of_measure_quantity": 1,
"allow_backorders": true,
"always_in_stock": true,
"lead_time_from": 7,
"lead_time_to": 15
}';
const headers = {
'Content-Type':'application/json',
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/SKUs/UpdateInventory/{id}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.put '/api/v1/SKUs/UpdateInventory/{id}',
params: {
}, headers: headers
p JSON.parse(result)
PUT /api/v1/SKUs/UpdateInventory/{id}
Body parameter
{
"inventory": 45,
"unit_of_measure": "EACH",
"unit_of_measure_quantity": 1,
"allow_backorders": true,
"always_in_stock": true,
"lead_time_from": 7,
"lead_time_to": 15
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | Primary identifier of the SKU to update |
body | body | SkuUpdateInventoryOptions | false | SKU to update |
inventory | body | number (double) ¦ null | false | The amount of inventory available for purchase. |
unit_of_measure | body | string ¦ null | false | The unit of measurement of the SKU |
unit_of_measure_quantity | body | number (double) ¦ null | false | The number of units belonging to the Unit of Measure |
allow_backorders | body | boolean ¦ null | false | When the SKU is out of stock, allow the customer to purchase. |
always_in_stock | body | boolean ¦ null | false | The SKU will always be display as in stock to the customer. |
lead_time_from | body | integer (int32) ¦ null | false | The minimum amount of time (in days), when the SKU is out of stock, that the SKU will take to ship. |
lead_time_to | body | integer (int32) ¦ null | false | The maximum amount of time (in days), when the SKU is out of stock, that the SKU will take to ship. |
Example responses
200 Response
{"id":99089,"object":"sku","client_identifier":"string","store_product_id":1188203,"library_product_id":1188203,"product":{"id":4245,"library_product_id":4245,"object":"product","client_identifier":"string","name":"WX Series Explosion-Proof Gas Catalytic Heater","short_name":"WX Series","short_description":"WX Series Infrared Gas Catalytic Explosion-Proof Heaters.","primary_image":"https://productimage.com/image.png","brand_id":124483,"brand":{},"quantity_discount_id":124483,"quantity_discount":{},"created_on":"2019-08-24T14:15:22Z","url":"https://domain.com/product/x1D"},"brand":{"client_identifier":"","name":"Brand Name","alias":"Brand Alias","id":92590,"object":"brand","created_on":"2020-12-01T08:00:00.000Z"},"sku_identifier":"PDA111-1","manufacturer_part_number":"PDA111-1","short_description":"string","description":"","list_price":75.99,"sale_price":45.99,"is_on_sale":true,"sale_start_date":"2020-12-01T08:00:00.000Z","sale_end_date":"2020-12-31T21:00:00.000Z","sale_maximum_quantity":0,"sale_minimum_quantity":0,"sale_label":"string","inventory":45,"unit_of_measure":"EACH","unit_of_measure_quantity":1,"inventory_alert":0,"is_featured":true,"always_in_stock":true,"shipping_rate_id":2,"shipping_rate":{"id":4,"object":"shippingrate","client_identifier":"string","name":"Heavy Items","shipping_economy":9.99,"shipping_economy_additional":5.99,"is_free_shipping":false,"economy_days_from":5,"economy_days_to":7,"shipping_priority":9.99,"shipping_priority_additional":5.99,"is_free_shipping_priority":false,"priority_days_from":1,"priority_days_to":3,"international_shipping_economy":9.99,"international_shipping_economy_additional":6.99,"is_free_international_shipping":false,"international_economy_days_from":7,"international_economy_days_to":30,"international_shipping_priority":9.99,"international_shipping_priority_additional":6.99,"is_free_international_shipping_priority":false,"international_priority_days_from":1,"international_priority_days_to":3,"is_default":false,"notes":""},"address_id":3,"address":{"client_identifier":"string","id":8,"object":"address","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","first_name":"string","last_name":"string","company_name":"string","city":"Main Office","state_code":"TX","country_code":"US","street1":"915 W Dallas St","street2":"Unit 112","postal_code":"77019","phone_number":"+1 713-123-1234","is_primary":true,"is_warehouse":true},"quantity_discount_id":3,"quantity_discount":{"client_identifier":"string","id":8,"object":"QuantityDiscount","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","is_active":true,"combine_with_other_products_using_same_discount":true,"apply_to_sale_price":true,"show_percentage_off":true,"show_product_discounts":true,"show_sku_discounts":true,"calculation":"OverrideDiscountLevelPercentDiscount","tiers":[],"discount_levels":[]},"allow_backorders":true,"lead_time_from":7,"lead_time_to":15,"lead_time_message":"15","price_discounts":[{}],"is_non_refundable":true,"is_non_refundable_message":"string","length":15,"width":7,"height":5,"weight":1500,"classification":"string","unspsc_classification":"string","price_visibility":"InheritFromProduct","created_on":"2020-12-01T08:00:00.000Z","modified_on":"2020-12-01T08:00:00.000Z","login_for_pricing_message":"string","in_stock_message":"string","out_of_stock_message":"string","request_quote":true}
{
"id": 99089,
"object": "sku",
"client_identifier": "string",
"store_product_id": 1188203,
"library_product_id": 1188203,
"product": {
"id": 4245,
"library_product_id": 4245,
"object": "product",
"client_identifier": "string",
"name": "WX Series Explosion-Proof Gas Catalytic Heater",
"short_name": "WX Series",
"short_description": "WX Series Infrared Gas Catalytic Explosion-Proof Heaters.",
"primary_image": "https://productimage.com/image.png",
"brand_id": 124483,
"brand": {},
"quantity_discount_id": 124483,
"quantity_discount": {},
"created_on": "2019-08-24T14:15:22Z",
"url": "https://domain.com/product/x1D"
},
"brand": {
"client_identifier": "",
"name": "Brand Name",
"alias": "Brand Alias",
"id": 92590,
"object": "brand",
"created_on": "2020-12-01T08:00:00.000Z"
},
"sku_identifier": "PDA111-1",
"manufacturer_part_number": "PDA111-1",
"short_description": "string",
"description": "",
"list_price": 75.99,
"sale_price": 45.99,
"is_on_sale": true,
"sale_start_date": "2020-12-01T08:00:00.000Z",
"sale_end_date": "2020-12-31T21:00:00.000Z",
"sale_maximum_quantity": 0,
"sale_minimum_quantity": 0,
"sale_label": "string",
"inventory": 45,
"unit_of_measure": "EACH",
"unit_of_measure_quantity": 1,
"inventory_alert": 0,
"is_featured": true,
"always_in_stock": true,
"shipping_rate_id": 2,
"shipping_rate": {
"id": 4,
"object": "shippingrate",
"client_identifier": "string",
"name": "Heavy Items",
"shipping_economy": 9.99,
"shipping_economy_additional": 5.99,
"is_free_shipping": false,
"economy_days_from": 5,
"economy_days_to": 7,
"shipping_priority": 9.99,
"shipping_priority_additional": 5.99,
"is_free_shipping_priority": false,
"priority_days_from": 1,
"priority_days_to": 3,
"international_shipping_economy": 9.99,
"international_shipping_economy_additional": 6.99,
"is_free_international_shipping": false,
"international_economy_days_from": 7,
"international_economy_days_to": 30,
"international_shipping_priority": 9.99,
"international_shipping_priority_additional": 6.99,
"is_free_international_shipping_priority": false,
"international_priority_days_from": 1,
"international_priority_days_to": 3,
"is_default": false,
"notes": ""
},
"address_id": 3,
"address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"quantity_discount_id": 3,
"quantity_discount": {
"client_identifier": "string",
"id": 8,
"object": "QuantityDiscount",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"is_active": true,
"combine_with_other_products_using_same_discount": true,
"apply_to_sale_price": true,
"show_percentage_off": true,
"show_product_discounts": true,
"show_sku_discounts": true,
"calculation": "OverrideDiscountLevelPercentDiscount",
"tiers": [],
"discount_levels": []
},
"allow_backorders": true,
"lead_time_from": 7,
"lead_time_to": 15,
"lead_time_message": "15",
"price_discounts": [
{}
],
"is_non_refundable": true,
"is_non_refundable_message": "string",
"length": 15,
"width": 7,
"height": 5,
"weight": 1500,
"classification": "string",
"unspsc_classification": "string",
"price_visibility": "InheritFromProduct",
"created_on": "2020-12-01T08:00:00.000Z",
"modified_on": "2020-12-01T08:00:00.000Z",
"login_for_pricing_message": "string",
"in_stock_message": "string",
"out_of_stock_message": "string",
"request_quote": true
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | SKU successfully updated. | Sku |
400 | Bad Request | Bad Request | ValidationProblemDetails |
401 | Unauthorized | Unauthorized | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Update the price of a SKU
Code samples
# You can also use wget
curl -X PUT /api/v1/SKUs/UpdatePrice/{id} \
-H 'Content-Type: application/json' \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer {access-token}'
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePutRequest()
{
int id = 1;
string url = "/api/v1/SKUs/UpdatePrice/{id}";
string json = @"{
""list_price"": 75.99,
""sale_price"": 45.99,
""is_on_sale"": true,
""sale_start_date"": ""2020-12-01T08:00:00.000Z"",
""sale_end_date"": ""2020-12-31T21:00:00.000Z""
}";
SkuUpdatePriceOptions content = JsonConvert.DeserializeObject(json);
var result = await PutAsync(id, content, url);
}
/// Performs a PUT Request
public async Task PutAsync(int id, SkuUpdatePriceOptions content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute PUT request
HttpResponseMessage response = await Client.PutAsync(url + $"/{id}", jsonContent);
//Return response
return await DeserializeObject(response);
}
/// Serialize an object to Json
private StringContent SerializeObject(SkuUpdatePriceOptions content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','/api/v1/SKUs/UpdatePrice/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.put('/api/v1/SKUs/UpdatePrice/{id}', headers = headers)
print(r.json())
const inputBody = '{
"list_price": 75.99,
"sale_price": 45.99,
"is_on_sale": true,
"sale_start_date": "2020-12-01T08:00:00.000Z",
"sale_end_date": "2020-12-31T21:00:00.000Z"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'text/plain',
'Authorization':'Bearer {access-token}'
};
fetch('/api/v1/SKUs/UpdatePrice/{id}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'text/plain',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.put '/api/v1/SKUs/UpdatePrice/{id}',
params: {
}, headers: headers
p JSON.parse(result)
PUT /api/v1/SKUs/UpdatePrice/{id}
Body parameter
{
"list_price": 75.99,
"sale_price": 45.99,
"is_on_sale": true,
"sale_start_date": "2020-12-01T08:00:00.000Z",
"sale_end_date": "2020-12-31T21:00:00.000Z"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | Primary identifier of the SKU to update |
body | body | SkuUpdatePriceOptions | false | SKU to update |
list_price | body | number (double) ¦ null | false | The SKU's price displayed when not on sale. |
sale_price | body | number (double) ¦ null | false | The SKU's price displayed when it is on sale. |
is_on_sale | body | boolean ¦ null | false | Turn the sale price of the product on if all criteria are met. |
sale_start_date | body | string (date-time) ¦ null | false | The UTC date and time when a SKU's sale price takes effect. |
sale_end_date | body | string (date-time) ¦ null | false | The UTC date and time when a sku's sale price ends. |
Detailed descriptions
is_on_sale: Turn the sale price of the product on if all criteria are met. - Sale price less than list price - Sale start date empty or less than today - Sale end date empty or greater than today
Example responses
200 Response
{"id":99089,"object":"sku","client_identifier":"string","store_product_id":1188203,"library_product_id":1188203,"product":{"id":4245,"library_product_id":4245,"object":"product","client_identifier":"string","name":"WX Series Explosion-Proof Gas Catalytic Heater","short_name":"WX Series","short_description":"WX Series Infrared Gas Catalytic Explosion-Proof Heaters.","primary_image":"https://productimage.com/image.png","brand_id":124483,"brand":{},"quantity_discount_id":124483,"quantity_discount":{},"created_on":"2019-08-24T14:15:22Z","url":"https://domain.com/product/x1D"},"brand":{"client_identifier":"","name":"Brand Name","alias":"Brand Alias","id":92590,"object":"brand","created_on":"2020-12-01T08:00:00.000Z"},"sku_identifier":"PDA111-1","manufacturer_part_number":"PDA111-1","short_description":"string","description":"","list_price":75.99,"sale_price":45.99,"is_on_sale":true,"sale_start_date":"2020-12-01T08:00:00.000Z","sale_end_date":"2020-12-31T21:00:00.000Z","sale_maximum_quantity":0,"sale_minimum_quantity":0,"sale_label":"string","inventory":45,"unit_of_measure":"EACH","unit_of_measure_quantity":1,"inventory_alert":0,"is_featured":true,"always_in_stock":true,"shipping_rate_id":2,"shipping_rate":{"id":4,"object":"shippingrate","client_identifier":"string","name":"Heavy Items","shipping_economy":9.99,"shipping_economy_additional":5.99,"is_free_shipping":false,"economy_days_from":5,"economy_days_to":7,"shipping_priority":9.99,"shipping_priority_additional":5.99,"is_free_shipping_priority":false,"priority_days_from":1,"priority_days_to":3,"international_shipping_economy":9.99,"international_shipping_economy_additional":6.99,"is_free_international_shipping":false,"international_economy_days_from":7,"international_economy_days_to":30,"international_shipping_priority":9.99,"international_shipping_priority_additional":6.99,"is_free_international_shipping_priority":false,"international_priority_days_from":1,"international_priority_days_to":3,"is_default":false,"notes":""},"address_id":3,"address":{"client_identifier":"string","id":8,"object":"address","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","first_name":"string","last_name":"string","company_name":"string","city":"Main Office","state_code":"TX","country_code":"US","street1":"915 W Dallas St","street2":"Unit 112","postal_code":"77019","phone_number":"+1 713-123-1234","is_primary":true,"is_warehouse":true},"quantity_discount_id":3,"quantity_discount":{"client_identifier":"string","id":8,"object":"QuantityDiscount","created_on":"2020-12-01T08:00:00.000Z","name":"Main Office","is_active":true,"combine_with_other_products_using_same_discount":true,"apply_to_sale_price":true,"show_percentage_off":true,"show_product_discounts":true,"show_sku_discounts":true,"calculation":"OverrideDiscountLevelPercentDiscount","tiers":[],"discount_levels":[]},"allow_backorders":true,"lead_time_from":7,"lead_time_to":15,"lead_time_message":"15","price_discounts":[{}],"is_non_refundable":true,"is_non_refundable_message":"string","length":15,"width":7,"height":5,"weight":1500,"classification":"string","unspsc_classification":"string","price_visibility":"InheritFromProduct","created_on":"2020-12-01T08:00:00.000Z","modified_on":"2020-12-01T08:00:00.000Z","login_for_pricing_message":"string","in_stock_message":"string","out_of_stock_message":"string","request_quote":true}
{
"id": 99089,
"object": "sku",
"client_identifier": "string",
"store_product_id": 1188203,
"library_product_id": 1188203,
"product": {
"id": 4245,
"library_product_id": 4245,
"object": "product",
"client_identifier": "string",
"name": "WX Series Explosion-Proof Gas Catalytic Heater",
"short_name": "WX Series",
"short_description": "WX Series Infrared Gas Catalytic Explosion-Proof Heaters.",
"primary_image": "https://productimage.com/image.png",
"brand_id": 124483,
"brand": {},
"quantity_discount_id": 124483,
"quantity_discount": {},
"created_on": "2019-08-24T14:15:22Z",
"url": "https://domain.com/product/x1D"
},
"brand": {
"client_identifier": "",
"name": "Brand Name",
"alias": "Brand Alias",
"id": 92590,
"object": "brand",
"created_on": "2020-12-01T08:00:00.000Z"
},
"sku_identifier": "PDA111-1",
"manufacturer_part_number": "PDA111-1",
"short_description": "string",
"description": "",
"list_price": 75.99,
"sale_price": 45.99,
"is_on_sale": true,
"sale_start_date": "2020-12-01T08:00:00.000Z",
"sale_end_date": "2020-12-31T21:00:00.000Z",
"sale_maximum_quantity": 0,
"sale_minimum_quantity": 0,
"sale_label": "string",
"inventory": 45,
"unit_of_measure": "EACH",
"unit_of_measure_quantity": 1,
"inventory_alert": 0,
"is_featured": true,
"always_in_stock": true,
"shipping_rate_id": 2,
"shipping_rate": {
"id": 4,
"object": "shippingrate",
"client_identifier": "string",
"name": "Heavy Items",
"shipping_economy": 9.99,
"shipping_economy_additional": 5.99,
"is_free_shipping": false,
"economy_days_from": 5,
"economy_days_to": 7,
"shipping_priority": 9.99,
"shipping_priority_additional": 5.99,
"is_free_shipping_priority": false,
"priority_days_from": 1,
"priority_days_to": 3,
"international_shipping_economy": 9.99,
"international_shipping_economy_additional": 6.99,
"is_free_international_shipping": false,
"international_economy_days_from": 7,
"international_economy_days_to": 30,
"international_shipping_priority": 9.99,
"international_shipping_priority_additional": 6.99,
"is_free_international_shipping_priority": false,
"international_priority_days_from": 1,
"international_priority_days_to": 3,
"is_default": false,
"notes": ""
},
"address_id": 3,
"address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"quantity_discount_id": 3,
"quantity_discount": {
"client_identifier": "string",
"id": 8,
"object": "QuantityDiscount",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"is_active": true,
"combine_with_other_products_using_same_discount": true,
"apply_to_sale_price": true,
"show_percentage_off": true,
"show_product_discounts": true,
"show_sku_discounts": true,
"calculation": "OverrideDiscountLevelPercentDiscount",
"tiers": [],
"discount_levels": []
},
"allow_backorders": true,
"lead_time_from": 7,
"lead_time_to": 15,
"lead_time_message": "15",
"price_discounts": [
{}
],
"is_non_refundable": true,
"is_non_refundable_message": "string",
"length": 15,
"width": 7,
"height": 5,
"weight": 1500,
"classification": "string",
"unspsc_classification": "string",
"price_visibility": "InheritFromProduct",
"created_on": "2020-12-01T08:00:00.000Z",
"modified_on": "2020-12-01T08:00:00.000Z",
"login_for_pricing_message": "string",
"in_stock_message": "string",
"out_of_stock_message": "string",
"request_quote": true
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | SKU successfully updated. | Sku |
400 | Bad Request | Bad Request | ValidationProblemDetails |
401 | Unauthorized | Unauthorized | ValidationProblemDetails |
403 | Forbidden | Forbidden | None |
429 | Too Many Requests | API call quota exceeded. | None |
Schemas
Account
{
"client_identifier": "",
"id": 12321,
"object": "account",
"discount_level": {
"id": 12321,
"object": "discountlevel",
"client_identifier": "",
"name": "loyalty discount",
"description": "Discount for regular customers.",
"brand_discounts": [],
"accounts": [],
"created_on": "2020-12-01T08:00:00.000Z"
},
"created_on": "2020-12-01T08:00:00.000Z",
"discount_level_id": 999,
"name": "Account Name",
"account_number": "ACCOUNT_001",
"payment_terms": "Net7",
"custom_payment_terms": "string",
"customer_type": "My Custom Customer Type",
"industry": "Office Equipment",
"city": "Seattle",
"state_code": "WA",
"country_code": "US",
"postal_code": "11234",
"street1": "111 example street",
"street2": "Unit 123",
"email": "jason@example.com",
"phone_number": "1-123-555-1234",
"user_accounts": [
{}
]
}
The Account
object contains information about payment accounts for a Store.
An Account will have a name, number, payment terms, address, and other contact information
related fields for the account.
Properties
Name | Type | Required | Description |
---|---|---|---|
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
id | integer (int64) | false | The primary identifier of the Account. |
object | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
discount_level | DiscountLevel | false | The DiscountLevel object is the container for discounts that are offered to customers of a store. A DiscountLevel will have a list of Account and BrandDiscount .A DiscountLevel will have a name and description field. |
created_on | string (date-time) | false | The UTC date the account was created on. |
discount_level_id | integer (int64) | false | The ID of the DiscountLevel that the account is attached to. |
name | string ¦ null | false | The unique name of the account. |
account_number | string ¦ null | false | The unique account number associated with the account. |
payment_terms | string | false | Payment terms are limited to the following pre-defined values: - Net7 - Net10 - Net15 - Net30 - Net60 - Net90 - CreditCard - CashOnDelivery - DueOnReceipt - EndOfMonth - PaymentInAdvance - Custom |
custom_payment_terms | string ¦ null | false | none |
customer_type | string ¦ null | false | The customer type of the account. |
industry | string ¦ null | false | The industry that the account is associated with. |
city | string ¦ null | false | The city or town of the account. |
state_code | string ¦ null | false | The two letter state or province code that corresponds to the state or province of the account. |
country_code | string ¦ null | false | The two letter country code the corresponds to the country of the account. |
postal_code | string ¦ null | false | The zip or postal code of the account. |
street1 | string ¦ null | false | The primary mailing address of the account. |
street2 | string ¦ null | false | An additional mailing address for the account. |
string ¦ null | false | The email address of the primary contact for the account. | |
phone_number | string ¦ null | false | The phone number at the address of the account. |
user_accounts | [AccountUser] ¦ null | false | The list of AccountUser associated with the account. |
Enumerated Values
Property | Value |
---|---|
payment_terms | NET7 |
payment_terms | NET10 |
payment_terms | NET15 |
payment_terms | NET30 |
payment_terms | NET60 |
payment_terms | NET90 |
payment_terms | CreditCard |
payment_terms | CashOnDelivery |
payment_terms | DueOnReceipt |
payment_terms | EndOfMonth |
payment_terms | PaymentInAdvance |
payment_terms | FifteenthOfMonth |
payment_terms | NET45 |
payment_terms | Custom |
payment_terms | TwoTenNET30 |
payment_terms | TwoTenNET45 |
payment_terms | TwoTenNET60 |
payment_terms | TwoTenNET90 |
AccountRequest
{
"client_identifier": "",
"discount_level_id": 999,
"name": "Account Name",
"account_number": "ACCOUNT_001",
"payment_terms": "Net7",
"custom_payment_terms": "string",
"customer_type": "My Custom Customer Type",
"industry": "Office Equipment",
"city": "Seattle",
"state_code": "WA",
"country_code": "US",
"postal_code": "11234",
"street1": "111 example street",
"street2": "Unit 123",
"email": "jason@example.com",
"phone_number": "1-123-555-1234",
"user_accounts": [
{}
]
}
The request object used to create or update an Account.
The Account
object contains information about payment accounts for a Store.
An Account will have a name, number, payment terms, address, and other contact information
related fields for the account.
When an Account
is first created an email will be sent out to the email address of the account holder
notifying them of their new payment account.
Properties
Name | Type | Required | Description |
---|---|---|---|
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
discount_level_id | integer (int64) | false | The ID of the DiscountLevel that the account is attached to. |
name | string ¦ null | false | The unique name of the account. |
account_number | string ¦ null | false | The unique account number associated with the account. |
payment_terms | string | false | Payment terms are limited to the following pre-defined values: - Net7 - Net10 - Net15 - Net30 - Net60 - Net90 - CreditCard - CashOnDelivery - DueOnReceipt - EndOfMonth - PaymentInAdvance - Custom |
custom_payment_terms | string ¦ null | false | none |
customer_type | string ¦ null | false | The customer type of the account. |
industry | string ¦ null | false | The industry that the account is associated with. |
city | string ¦ null | false | The city or town of the account. |
state_code | string ¦ null | false | The two letter state or province code that corresponds to the state or province of the account. |
country_code | string ¦ null | false | The two letter country code the corresponds to the country of the account. |
postal_code | string ¦ null | false | The zip or postal code of the account. |
street1 | string ¦ null | false | The primary mailing address of the account. |
street2 | string ¦ null | false | An additional mailing address for the account. |
string ¦ null | false | The email address of the primary contact for the account. | |
phone_number | string ¦ null | false | The phone number at the address of the account. |
user_accounts | [AccountUserRequest] ¦ null | false | Include this list of AccountUser to create account users for the account. |
Enumerated Values
Property | Value |
---|---|
payment_terms | NET7 |
payment_terms | NET10 |
payment_terms | NET15 |
payment_terms | NET30 |
payment_terms | NET60 |
payment_terms | NET90 |
payment_terms | CreditCard |
payment_terms | CashOnDelivery |
payment_terms | DueOnReceipt |
payment_terms | EndOfMonth |
payment_terms | PaymentInAdvance |
payment_terms | FifteenthOfMonth |
payment_terms | NET45 |
payment_terms | Custom |
payment_terms | TwoTenNET30 |
payment_terms | TwoTenNET45 |
payment_terms | TwoTenNET60 |
payment_terms | TwoTenNET90 |
AccountUser
{
"client_identifier": "",
"id": "12321",
"object": "accountuser",
"discount_level": {
"id": 12321,
"object": "discountlevel",
"client_identifier": "",
"name": "loyalty discount",
"description": "Discount for regular customers.",
"brand_discounts": [],
"accounts": [],
"created_on": "2020-12-01T08:00:00.000Z"
},
"account": {
"client_identifier": "",
"id": 12321,
"object": "account",
"discount_level": {},
"created_on": "2020-12-01T08:00:00.000Z",
"discount_level_id": 999,
"name": "Account Name",
"account_number": "ACCOUNT_001",
"payment_terms": "Net7",
"custom_payment_terms": "string",
"customer_type": "My Custom Customer Type",
"industry": "Office Equipment",
"city": "Seattle",
"state_code": "WA",
"country_code": "US",
"postal_code": "11234",
"street1": "111 example street",
"street2": "Unit 123",
"email": "jason@example.com",
"phone_number": "1-123-555-1234",
"user_accounts": []
},
"created_on": "2020-12-01T08:00:00.000Z",
"account_id": 999,
"discount_level_id": 0,
"first_name": "Madison",
"last_name": "Smith",
"salutation": "Mr",
"email": "user@example.com",
"title": "Director",
"department": "Department name",
"phone_number": "1-123-555-1234"
}
The AccountUser
object contains information about account users under an Account
.
An AccountUser
will have a first and last name, phone number, email, and other fields
related to their job position.
Properties
Name | Type | Required | Description |
---|---|---|---|
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
id | string ¦ null | false | The primary identifier of the Account User. |
object | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
discount_level | DiscountLevel | false | The DiscountLevel object is the container for discounts that are offered to customers of a store. A DiscountLevel will have a list of Account and BrandDiscount .A DiscountLevel will have a name and description field. |
account | Account | false | The Account object contains information about payment accounts for a Store. An Account will have a name, number, payment terms, address, and other contact information related fields for the account. |
created_on | string (date-time) | false | The UTC date when the account user was created. |
account_id | integer (int64) | false | The ID of the Account that the account user is attached to. |
discount_level_id | integer (int64) | false | The ID of the DiscountLevel that the account user is attached to. |
first_name | string ¦ null | false | The first name of the account user. |
last_name | string ¦ null | false | The last name of the account user. |
salutation | string ¦ null | false | The salutation of the account user. |
string ¦ null | false | The email address of the account user. This must be unique. When an account user is first created, an email will be sent to this address. This field cannot be updated after an account user is created. |
|
title | string ¦ null | false | The account user's job title or position within their company. |
department | string ¦ null | false | The department of the account user. |
phone_number | string ¦ null | false | The phone number of the account user. |
AccountUserRequest
{
"client_identifier": "",
"account_id": 999,
"discount_level_id": 0,
"first_name": "Madison",
"last_name": "Smith",
"salutation": "Mr.",
"email": "user@example.com",
"title": "job title",
"department": "Department name",
"phone_number": "1-123-555-1234"
}
The request object used to create or update an Account User.
The AccountUser
object contains information about account users under an Account
.
An AccountUser
will have a first and last name, phone number, email, and other fields
related to their job position.
When an AccountUser
is first created an email will be sent out to the account user notifying
them that they have been added to the payment account.
Properties
Name | Type | Required | Description |
---|---|---|---|
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
account_id | integer (int64) | false | The ID of the Account that the account user is attached to. |
discount_level_id | integer (int64) | false | The ID of the DiscountLevel that the account user is attached to. |
first_name | string ¦ null | false | The first name of the account user. |
last_name | string ¦ null | false | The last name of the account user. |
salutation | string ¦ null | false | The salutation of the account user. |
string ¦ null | false | The email address of the account user. This must be unique. When an account user is first created, an email will be sent to this address. This field cannot be updated after an account user is created. |
|
title | string ¦ null | false | The title of the account user. |
department | string ¦ null | false | The department of the account user. |
phone_number | string ¦ null | false | The phone number of the account user. |
AccountUsers
{
"object": "list",
"data": [
{}
],
"has_more": true,
"total_items": 0,
"url": "string",
"count": 0
}
A list of object that can be accessed by index.
Properties
Name | Type | Required | Description |
---|---|---|---|
object | string ¦ null | false | A string describing the object type returned. |
data | [AccountUser] ¦ null | false | A list containing the actual response elements, paginated by any request parameters. |
has_more | boolean | false | Whether or not there are more elements available after this set. If false ,this set comprises the end of the list. |
total_items | integer (int64) | false | The total number of items that can be returned by the endpoint resource with the current search parameters. |
url | string ¦ null | false | The URL for accessing this list. |
count | integer (int32) | false | Gets the number of elements contained in the List. |
Accounts
{
"object": "list",
"data": [
{}
],
"has_more": true,
"total_items": 0,
"url": "string",
"count": 0
}
A list of object that can be accessed by index.
Properties
Name | Type | Required | Description |
---|---|---|---|
object | string ¦ null | false | A string describing the object type returned. |
data | [Account] ¦ null | false | A list containing the actual response elements, paginated by any request parameters. |
has_more | boolean | false | Whether or not there are more elements available after this set. If false ,this set comprises the end of the list. |
total_items | integer (int64) | false | The total number of items that can be returned by the endpoint resource with the current search parameters. |
url | string ¦ null | false | The URL for accessing this list. |
count | integer (int32) | false | Gets the number of elements contained in the List. |
AddOnInput
{
"sortorder": "string",
"input": "string"
}
Additional components or features that can be added to a quote item
Properties
Name | Type | Required | Description |
---|---|---|---|
sortorder | string ¦ null | false | Item number the configuration data belongs to |
input | string ¦ null | false | Input for Add-On |
AddOnRequest
{
"id": 997,
"client_identifier": "",
"name": "loyalty discount"
}
The request object used to create or update a Add-On.
The Add-On
object contains information about Add-Ons associated with a SKU.
Properties
Name | Type | Required | Description |
---|---|---|---|
id | integer (int64) | false | The ID associated with the Add-On. |
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
name | string ¦ null | false | The name of the discount level. |
Address
{
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
}
The Address object contains information about a place, or location. Examples are - Offices - Warehouses - Shipping Addresses - Billing Addresses
Properties
Name | Type | Required | Description |
---|---|---|---|
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
id | integer (int64) | false | The primary identifier of the Address. |
object | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
created_on | string (date-time) | false | When the address was created. |
name | string ¦ null | false | Gets or sets the name of the address. |
first_name | string ¦ null | false | The first name of the address contact. |
last_name | string ¦ null | false | The last name of the address contact. |
company_name | string ¦ null | false | The company name of the address contact. |
city | string ¦ null | false | Gets or sets the city. |
state_code | string ¦ null | false | The two-letter abbreviation of the state or province. |
country_code | string ¦ null | false | The two-letter code (ISO 3166-1 alpha-2 two-letter country code) for the country. |
street1 | string ¦ null | false | The primary street address. |
street2 | string ¦ null | false | Optional field for additional information for the street address. |
postal_code | string ¦ null | false | The zip or postal code |
phone_number | string ¦ null | false | The phone number |
is_primary | boolean | false | Is this your main address. Not updateable |
is_warehouse | boolean | false | Is this address only a warehouse? Will not show up on contact pages when true. |
AddressRequest
{
"client_identifier": "string",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
}
The request object used to create or update an Address.
The Address
object contains information about a place, or location.
Examples are - Offices - Warehouses - Shipping Addresses - Billing Addresses
Properties
Name | Type | Required | Description |
---|---|---|---|
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
name | string ¦ null | false | Gets or sets the name of the address. |
first_name | string ¦ null | false | The first name of the address contact. |
last_name | string ¦ null | false | The last name of the address contact. |
company_name | string ¦ null | false | The company name of the address contact. |
city | string ¦ null | false | Gets or sets the city. |
state_code | string ¦ null | false | Gets or sets the two-letter abbreviation of the state or province. |
country_code | string ¦ null | false | Gets or sets the two-letter code (ISO 3166-1 alpha-2 two-letter country code) for the country |
street1 | string ¦ null | false | Gets or sets the street address |
street2 | string ¦ null | false | Optional field for additional information for the street address |
postal_code | string ¦ null | false | The zip or postal code |
phone_number | string ¦ null | false | The phone number |
is_primary | boolean | false | Is this your main address. Not updateable |
is_warehouse | boolean | false | Is this address only a warehouse? Will not show up on contact pages when true. |
Addresss
{
"object": "list",
"data": [
{}
],
"has_more": true,
"total_items": 0,
"url": "string",
"count": 0
}
A list of object that can be accessed by index.
Properties
Name | Type | Required | Description |
---|---|---|---|
object | string ¦ null | false | A string describing the object type returned. |
data | [Address] ¦ null | false | A list containing the actual response elements, paginated by any request parameters. |
has_more | boolean | false | Whether or not there are more elements available after this set. If false ,this set comprises the end of the list. |
total_items | integer (int64) | false | The total number of items that can be returned by the endpoint resource with the current search parameters. |
url | string ¦ null | false | The URL for accessing this list. |
count | integer (int32) | false | Gets the number of elements contained in the List. |
BillingAddress
{
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
}
The mailing address associated with the payment method.
Properties
Name | Type | Required | Description |
---|---|---|---|
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
id | integer (int64) | false | The primary identifier of the Address. |
object | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
created_on | string (date-time) | false | When the address was created. |
name | string ¦ null | false | Gets or sets the name of the address. |
first_name | string ¦ null | false | The first name of the address contact. |
last_name | string ¦ null | false | The last name of the address contact. |
company_name | string ¦ null | false | The company name of the address contact. |
city | string ¦ null | false | Gets or sets the city. |
state_code | string ¦ null | false | The two-letter abbreviation of the state or province. |
country_code | string ¦ null | false | The two-letter code (ISO 3166-1 alpha-2 two-letter country code) for the country. |
street1 | string ¦ null | false | The primary street address. |
street2 | string ¦ null | false | Optional field for additional information for the street address. |
postal_code | string ¦ null | false | The zip or postal code |
phone_number | string ¦ null | false | The phone number |
is_primary | boolean | false | Is this your main address. Not updateable |
is_warehouse | boolean | false | Is this address only a warehouse? Will not show up on contact pages when true. |
Brand
{
"client_identifier": "",
"name": "Brand Name",
"alias": "Brand Alias",
"id": 92590,
"object": "brand",
"created_on": "2020-12-01T08:00:00.000Z"
}
The Brand
object contains information about brands.
A brand is a term, name or design that is associated with a number of sellers, goods or products.
A brand represents the identity or personality of a given set of products.
Brands may manufacturer and sell their products through their own seller or through multiple sellers.
A Brand will have a name, alias, and list of related Product
.
Properties
Name | Type | Required | Description |
---|---|---|---|
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
name | string ¦ null | false | The unique name of the brand. |
alias | string ¦ null | false | Another name that can be used to reference the brand. |
id | integer (int64) | false | The primary identifier of the Brand. |
object | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
created_on | string (date-time) | false | The UTC date the brand was created on. |
BrandDiscount
{
"id": 12321,
"object": "branddiscount",
"client_identifier": "",
"brand_id": 999,
"brand": {
"client_identifier": "",
"name": "Brand Name",
"alias": "Brand Alias",
"id": 92590,
"object": "brand",
"created_on": "2020-12-01T08:00:00.000Z"
},
"discount_level_id": 999,
"discount_level": {
"id": 12321,
"object": "discountlevel",
"client_identifier": "",
"name": "loyalty discount",
"description": "Discount for regular customers.",
"brand_discounts": [],
"accounts": [],
"created_on": "2020-12-01T08:00:00.000Z"
},
"percent_discount": 25,
"created_on": "2020-12-01T08:00:00.000Z"
}
The BrandDiscount
object contains information about Brand Discounts associated with a Discount Llevel.
A BrandDiscount
specifies the discount percentage that will
apply to any products of a given brand purchased through an Account
.
A BrandDiscount
will have PercentDiscount
, Brand
, and DiscountLevel
fields.
Properties
Name | Type | Required | Description |
---|---|---|---|
id | integer (int64) | false | The primary identifier of the Brand Discount. |
object | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
brand_id | integer (int64) | false | The ID of the Brand that the Brand Discount is attached to. |
brand | Brand | false | The Brand object contains information about brands.A brand is a term, name or design that is associated with a number of sellers, goods or products. A brand represents the identity or personality of a given set of products. Brands may manufacturer and sell their products through their own seller or through multiple sellers. A Brand will have a name, alias, and list of related Product . |
discount_level_id | integer (int64) | false | The ID of the DiscountLevel that the Brand Discount is attached to. |
discount_level | DiscountLevel | false | The DiscountLevel object is the container for discounts that are offered to customers of a store. A DiscountLevel will have a list of Account and BrandDiscount .A DiscountLevel will have a name and description field. |
percent_discount | number (double) | false | The discount percentage. This must be a value from 0 to 100. |
created_on | string (date-time) | false | The UTC date when the Brand Discount was created. |
BrandDiscountRequest
{
"brand_discount_id": 997,
"client_identifier": "",
"brand_id": 999,
"discount_level_id": 999,
"percent_discount": 25
}
The request object used to create or update a Brand Discount.
The BrandDiscount
object contains information about Brand Discounts associated with a Discount Level.
A BrandDiscount
specifies the discount percentage that will
apply to any products of a given brand purchased through an Account
.
A BrandDiscount
will have PercentDiscount
, Brand
, and DiscountLevel
fields.
Properties
Name | Type | Required | Description |
---|---|---|---|
brand_discount_id | integer (int64) | false | The ID associated with the Brand Discount. |
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
brand_id | integer (int64) | false | The ID of the Brand that the Brand Discount is attached to. |
discount_level_id | integer (int64) | false | The ID of the DiscountLevel that the Brand Discount is attached to. |
percent_discount | number (double) | false | The discount percentage. This must be a value from 0 to 100. |
BrandDiscounts
{
"object": "list",
"data": [
{}
],
"has_more": true,
"total_items": 0,
"url": "string",
"count": 0
}
A list of object that can be accessed by index.
Properties
Name | Type | Required | Description |
---|---|---|---|
object | string ¦ null | false | A string describing the object type returned. |
data | [BrandDiscount] ¦ null | false | A list containing the actual response elements, paginated by any request parameters. |
has_more | boolean | false | Whether or not there are more elements available after this set. If false ,this set comprises the end of the list. |
total_items | integer (int64) | false | The total number of items that can be returned by the endpoint resource with the current search parameters. |
url | string ¦ null | false | The URL for accessing this list. |
count | integer (int32) | false | Gets the number of elements contained in the List. |
Carrier
{
"id": 8,
"object": "carrier",
"slug": "DHLExpress",
"name": "DHL Express"
}
The Carrier
object represents a common carrier (or public carrier) responsible for transporting an order Shipment
.
Properties
Name | Type | Required | Description |
---|---|---|---|
id | integer (int64) | false | The primary identifier of the Carrier. |
object | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
slug | string ¦ null | false | The shortened carrier name. |
name | string ¦ null | false | The formatted string name of the carrier. |
Customer
{
"id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"object": "customer",
"first_name": "John",
"last_name": "Smit",
"company_name": "Widgets Inc",
"email_address": "john@widgetsinc.com",
"phone_number": "555-123-1234",
"account_id": 12,
"account_name": "Widgets Inc",
"account_number": "123456",
"discount_level_id": 14,
"discount_level_name": "PRICELEVEL-1"
}
Properties
Name | Type | Required | Description |
---|---|---|---|
id | string ¦ null | false | Unique identifier for the object. |
object | string ¦ null | false | String representing the object’s type. Objects of the same type share the same value. |
first_name | string ¦ null | false | The first name of the customer. |
last_name | string ¦ null | false | The last name of the customer. |
company_name | string ¦ null | false | The company name of the customer. |
email_address | string ¦ null | false | The email address of the customer, if provided. |
phone_number | string ¦ null | false | The phone number of the customer, if provided. |
account_id | integer (int64) ¦ null | false | The account associated with the customer. |
account_name | string ¦ null | false | The account name associated with the customer. |
account_number | string ¦ null | false | The account number associated with the customer. |
discount_level_id | integer (int64) ¦ null | false | The discount level associated with the customer. |
discount_level_name | string ¦ null | false | The discount level name associated with the customer. |
DiscountLevel
{
"id": 12321,
"object": "discountlevel",
"client_identifier": "",
"name": "loyalty discount",
"description": "Discount for regular customers.",
"brand_discounts": [
{}
],
"accounts": [
{}
],
"created_on": "2020-12-01T08:00:00.000Z"
}
The DiscountLevel
object is the container for discounts that are offered to customers of
a store. A DiscountLevel
will have a list of Account
and BrandDiscount
.
A DiscountLevel
will have a name and description field.
Properties
Name | Type | Required | Description |
---|---|---|---|
id | integer (int64) | false | The primary identifier of the Discount Level. |
object | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
name | string ¦ null | false | The name of the discount level. |
description | string ¦ null | false | The description of the discount level. |
brand_discounts | [BrandDiscount] ¦ null | false | A list of BrandDiscount associated with the discount level.A BrandDiscount is required for the discount level to have any effect.Each BrandDiscount contains the percentage discount and the Brand that the discount applies to. |
accounts | [Account] ¦ null | false | A list of Account associated with the discount level. |
created_on | string (date-time) | false | The UTC date when the discount level was created. |
DiscountLevelRequest
{
"client_identifier": "",
"name": "loyalty discount",
"description": "Discount for regular customers.",
"brand_discounts": [
{}
],
"accounts": [
{}
]
}
The request object used to create or update an Discount Level.
The DiscountLevel
object is the container for discounts that are offered to customers of
a store. A DiscountLevel
will have a list of Account
and BrandDiscount
.
A DiscountLevel
will have a name and description field.
Properties
Name | Type | Required | Description |
---|---|---|---|
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
name | string ¦ null | false | The name of the discount level. |
description | string ¦ null | false | The description of the discount level. |
brand_discounts | [BrandDiscountRequest] ¦ null | false | A list of BrandDiscount associated with the discount level.A BrandDiscount is required for the discount level to have any effect.Each BrandDiscount contains the percentage discount and the Brand that the discount applies to. Include this list of BrandDiscount to create or update Brand Discounts for the Discount Level. |
accounts | [AccountRequest] ¦ null | false | A list of Account associated with the discount level.Include this list of Account to create or update Accounts for the Discount Level. |
DiscountLevels
{
"object": "list",
"data": [
{}
],
"has_more": true,
"total_items": 0,
"url": "string",
"count": 0
}
A list of object that can be accessed by index.
Properties
Name | Type | Required | Description |
---|---|---|---|
object | string ¦ null | false | A string describing the object type returned. |
data | [DiscountLevel] ¦ null | false | A list containing the actual response elements, paginated by any request parameters. |
has_more | boolean | false | Whether or not there are more elements available after this set. If false ,this set comprises the end of the list. |
total_items | integer (int64) | false | The total number of items that can be returned by the endpoint resource with the current search parameters. |
url | string ¦ null | false | The URL for accessing this list. |
count | integer (int32) | false | Gets the number of elements contained in the List. |
Order
{
"id": 8,
"object": "order",
"client_identifier": "string",
"shopping_cart_id": 43,
"order_number": "ORD-000009158381-123",
"customer_id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"customer": {
"id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"object": "customer",
"first_name": "John",
"last_name": "Smit",
"company_name": "Widgets Inc",
"email_address": "john@widgetsinc.com",
"phone_number": "555-123-1234",
"account_id": 12,
"account_name": "Widgets Inc",
"account_number": "123456",
"discount_level_id": 14,
"discount_level_name": "PRICELEVEL-1"
},
"items": [
{}
],
"shipping_address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"billing_address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"shipments": [
{}
],
"shipping_instructions": "",
"shipping_method": "Standard Shipping",
"currency_code": "CAD",
"seller_currency_code": "USD",
"order_status": "Processing",
"payment_method": "CreditCard",
"subtotal": 484.99,
"freight": 15.99,
"tax": 24.25,
"discount": 15,
"tax_rate": 0.05,
"transaction_fee": 31.23,
"total": 525.23,
"exchange_rate": 0.75,
"seller_subtotal": 363.74,
"seller_freight": 11.99,
"seller_tax": 18.19,
"seller_discount": 10,
"seller_transaction_fee": 31.23,
"seller_total": 393.917,
"ordered_date": "2020-12-01T08:00:00.000Z",
"additional_information": {
"tax_id": "xx-xxxxxxx",
"purchase_order_number": "PO-89838",
"fields": [],
"comments": ""
},
"url": "https://domain.com/order/x1D"
}
The Order object contains information about the sales order. An order is a customer's completed request to purchase one or more products from a shop.
An order is created when a customer completes the checkout process, during which time they provide an email address or phone number, billing address and payment information.
Properties
Name | Type | Required | Description |
---|---|---|---|
id | integer (int64) | false | The primary identifier of the Order |
object | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
shopping_cart_id | integer (int64) ¦ null | false | A unique identifier for the shopping cart |
order_number | string ¦ null | false | A unique identifier for the order |
customer_id | string ¦ null | false | The primary identifier for the customer |
customer | Customer | false | none |
items | [OrderItem] ¦ null | false | A list of line item objects, each containing information about an item in the order. |
shipping_address | ShippingAddress | false | The mailing address to where the order will be shipped. |
billing_address | BillingAddress | false | The mailing address associated with the payment method. |
shipments | [Shipment] ¦ null | false | List of shipments for the order |
shipping_instructions | string ¦ null | false | Special instructions to be used when sending out shipments |
shipping_method | string ¦ null | false | How the order is to be shipped |
currency_code | string ¦ null | false | The three letter code (ISO 4217) for the currency used for the payment. |
seller_currency_code | string ¦ null | false | The three letter code (ISO 4217) for the store's currency. |
order_status | string | false | Order statuses are limited to the following pre-defined values: - New - Order has been placed by the customer, but has not yet been confirmed. - Processing - Order has been confirmed by the seller, but has not shipped. - Shipped - Order has been fully shipped, but has not been delivered. - PartiallyShipped - Some but not all items of an order have been shipped. - Complete - Order has been delivered. - Cancelled - Order has been cancelled by the seller or customer . - RefundRequested - Customer has requested a refund for the order. - Refunded - Seller has refunded the order. - RefundRejected - Seller has rejected the refund request. |
payment_method | string | false | Payment methods are limited to the following pre-defined values: - CreditCard - Customer used a credit card, and funds are collected when the order is confirmed - Account - Customer is attached to an account, and the seller is responsible for collecting payment |
subtotal | number (double) | false | The subtotal for all the line items of the order in the Customer's currency |
freight | number (double) | false | The total freight of the order in the Customer's currency |
tax | number (double) | false | The total tax for the order in the Customer's currency |
discount | number (double) | false | The total discount for the order in the Customer's currency |
tax_rate | number (double) | false | The tax rate of the order |
transaction_fee | number (double) | false | The total amount of the transaction fee in the Customer's currency |
total | number (double) | false | The total amount of the order in the Customer's currency |
exchange_rate | number (double) | false | The exchange rate used when the order was placed. |
seller_subtotal | number (double) | false | The subtotal for all the line items of the order in the Seller's currency |
seller_freight | number (double) | false | The total freight of the order in the Seller's currency |
seller_tax | number (double) | false | The total tax for the order in the Seller's currency |
seller_discount | number (double) | false | The total discount for the order in the Seller's currency |
seller_transaction_fee | number (double) | false | The total amount of the transaction fee in the Seller's currency |
seller_total | number (double) | false | The total amount of the order in the Seller's currency |
ordered_date | string (date-time) | false | The UTC date the order was created on. |
additional_information | OrderAdditionalInformation | false | none |
url | string (uri) ¦ null | false | The Url to the order for the customer |
Enumerated Values
Property | Value |
---|---|
order_status | New |
order_status | Processing |
order_status | Shipped |
order_status | PartiallyShipped |
order_status | Complete |
order_status | Cancelled |
order_status | Received |
order_status | RefundRequested |
order_status | Refunded |
order_status | RefundRejected |
order_status | StockConfirmed |
order_status | StockPartiallyConfirmed |
order_status | ReadyForPickup |
order_status | PartiallyReadyForPickup |
payment_method | CreditCard |
payment_method | Account |
payment_method | Free |
OrderAdditionalInformation
{
"tax_id": "xx-xxxxxxx",
"purchase_order_number": "PO-89838",
"fields": [
{}
],
"comments": ""
}
Properties
Name | Type | Required | Description |
---|---|---|---|
tax_id | string ¦ null | false | Customer's Tax Id / ITIN / EIN |
purchase_order_number | string ¦ null | false | Customer's Purchase Order Number |
fields | [OrderAdditionalInformationField] ¦ null | false | Custom fields to display on the order |
comments | string ¦ null | false | The text of optional comments that a customer can attach to the order. |
OrderAdditionalInformationField
{
"name": "Job Number",
"value": "PO-89838"
}
Properties
Name | Type | Required | Description |
---|---|---|---|
name | string ¦ null | false | Display Name for the Field |
value | string ¦ null | false | Display for the field |
OrderCancelOptions
{
"expand": [
"string"
],
"message": "string"
}
Properties
Name | Type | Required | Description |
---|---|---|---|
expand | [string] ¦ null | false | Array of strings for child properties to expand. |
message | string ¦ null | false | none |
OrderConfirmOptions
{
"expand": [
"string"
],
"confirm_stock": true
}
Properties
Name | Type | Required | Description |
---|---|---|---|
expand | [string] ¦ null | false | Array of strings for child properties to expand. |
confirm_stock | boolean | false | Will confirm and capture the payment for all order items when confirming the order. |
OrderItem
{
"id": 0,
"object": "orderitem",
"client_identifier": "string",
"sku_id": 4434,
"sku": {
"id": 99089,
"object": "sku",
"client_identifier": "string",
"store_product_id": 1188203,
"library_product_id": 1188203,
"product": {},
"brand": {},
"sku_identifier": "PDA111-1",
"manufacturer_part_number": "PDA111-1",
"short_description": "string",
"description": "",
"list_price": 75.99,
"sale_price": 45.99,
"is_on_sale": true,
"sale_start_date": "2020-12-01T08:00:00.000Z",
"sale_end_date": "2020-12-31T21:00:00.000Z",
"sale_maximum_quantity": 0,
"sale_minimum_quantity": 0,
"sale_label": "string",
"inventory": 45,
"unit_of_measure": "EACH",
"unit_of_measure_quantity": 1,
"inventory_alert": 0,
"is_featured": true,
"always_in_stock": true,
"shipping_rate_id": 2,
"shipping_rate": {},
"address_id": 3,
"address": {},
"quantity_discount_id": 3,
"quantity_discount": {},
"allow_backorders": true,
"lead_time_from": 7,
"lead_time_to": 15,
"lead_time_message": "15",
"price_discounts": [],
"is_non_refundable": true,
"is_non_refundable_message": "string",
"length": 15,
"width": 7,
"height": 5,
"weight": 1500,
"classification": "string",
"unspsc_classification": "string",
"price_visibility": "InheritFromProduct",
"created_on": "2020-12-01T08:00:00.000Z",
"modified_on": "2020-12-01T08:00:00.000Z",
"login_for_pricing_message": "string",
"in_stock_message": "string",
"out_of_stock_message": "string",
"request_quote": true
},
"order_id": 8,
"product_id": 225,
"product": {
"id": 4245,
"library_product_id": 4245,
"object": "product",
"client_identifier": "string",
"name": "WX Series Explosion-Proof Gas Catalytic Heater",
"short_name": "WX Series",
"short_description": "WX Series Infrared Gas Catalytic Explosion-Proof Heaters.",
"primary_image": "https://productimage.com/image.png",
"brand_id": 124483,
"brand": {},
"quantity_discount_id": 124483,
"quantity_discount": {},
"created_on": "2019-08-24T14:15:22Z",
"url": "https://domain.com/product/x1D"
},
"quantity": 4,
"model_number": "string",
"price_per_unit": 0,
"seller_price_per_unit": 0,
"add_ons": [
{}
],
"unit_of_measure": "string"
}
The Order Item object contains information about items belonging to a order.
Properties
Name | Type | Required | Description |
---|---|---|---|
id | integer (int64) | false | Primary identifier for the line item |
object | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
sku_id | integer (int64) ¦ null | false | The ID of the SKU that the Order Item is attached to. |
sku | Sku | false | The SKU object contains information about inventory and pricing for a Store. An SKU will have a internal name identifier, manufacturer part number, inventory, pricing, and other information related fields for the SKU. |
order_id | integer (int64) | false | The ID of the Order that the Order Item is attached to. |
product_id | integer (int64) | false | The ID of the Product that the Order Item is attached to. |
product | Product | false | The Product object contains information about products. An Product will have a name, short name, short description, brand, and sku information. |
quantity | integer (int32) | false | The number of items that were purchased. |
model_number | string ¦ null | false | The item's MPN (Manufacturer's Part Number). |
price_per_unit | number (double) | false | Customer's Price of each item |
seller_price_per_unit | number (double) | false | Sellers's Price of each item |
add_ons | [OrderItemAddOn] ¦ null | false | A list of add-ons that are attached to the order items |
unit_of_measure | string ¦ null | false | Item Unit of Measure |
OrderItemAddOn
{
"id": 0,
"add_on_id": 0,
"object": "orderitem",
"client_identifier": "string",
"quantity": 4,
"model_number": "string",
"price_per_unit": 0,
"seller_price_per_unit": 0,
"configuration": "string",
"items": [
{}
]
}
Additional components or features that can be added to a order item
Properties
Name | Type | Required | Description |
---|---|---|---|
id | integer (int64) | false | Primary identifier for the order item add-on |
add_on_id | integer (int64) | false | Primary identifier for the add-on |
object | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
quantity | integer (int32) | false | The number of items that were purchased. |
model_number | string ¦ null | false | The item's MPN (Manufacturer's Part Number). |
price_per_unit | number (double) | false | Customer's Price of each item |
seller_price_per_unit | number (double) | false | Sellers's Price of each item |
configuration | string ¦ null | false | JSON of the items configured for the add-on |
items | [AddOnInput] ¦ null | false | [Additional components or features that can be added to a quote item] |
OrderRequest
{
"client_identifier": "string",
"order_number": "ORD-000009158381-123",
"customer_id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"account_id": 0,
"items": [
{}
],
"shipping_address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"billing_address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"shipments": [
{}
],
"shipping_instructions": "",
"shipping_method": "Standard Shipping",
"currency_code": "CAD",
"seller_currency_code": "USD",
"order_status": "Processing",
"subtotal": 484.99,
"freight": 15.99,
"tax": 24.25,
"discount": 15,
"tax_rate": 0.05,
"total": 525.23,
"ordered_date": "2020-12-01T08:00:00.000Z",
"additional_information": {
"tax_id": "xx-xxxxxxx",
"purchase_order_number": "PO-89838",
"fields": [],
"comments": ""
}
}
The Order object contains information about the sales order. An order is a customer's completed request to purchase one or more products from a shop.
An order is created when a customer completes the checkout process, during which time they provide an email address or phone number, billing address and payment information.
Properties
Name | Type | Required | Description |
---|---|---|---|
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
order_number | string ¦ null | false | A unique identifier for the order |
customer_id | string ¦ null | false | The primary identifier for the customer |
account_id | integer (int64) ¦ null | false | The account associated with the customer. |
items | [OrderItem] ¦ null | false | A list of line item objects, each containing information about an item in the order. |
shipping_address | ShippingAddress | false | The mailing address to where the order will be shipped. |
billing_address | BillingAddress | false | The mailing address associated with the payment method. |
shipments | [Shipment] ¦ null | false | List of shipments for the order |
shipping_instructions | string ¦ null | false | Special instructions to be used when sending out shipments |
shipping_method | string ¦ null | false | How the order is to be shipped |
currency_code | string ¦ null | false | The three letter code (ISO 4217) for the currency used for the payment. |
seller_currency_code | string ¦ null | false | The three letter code (ISO 4217) for the store's currency. |
order_status | string | false | Order statuses are limited to the following pre-defined values: - New - Order has been placed by the customer, but has not yet been confirmed. - Processing - Order has been confirmed by the seller, but has not shipped. - Shipped - Order has been fully shipped, but has not been delivered. - PartiallyShipped - Some but not all items of an order have been shipped. - Complete - Order has been delivered. - Cancelled - Order has been cancelled by the seller or customer . - RefundRequested - Customer has requested a refund for the order. - Refunded - Seller has refunded the order. - RefundRejected - Seller has rejected the refund request. |
subtotal | number (double) | false | The subtotal for all the line items of the order in the Customer's currency |
freight | number (double) | false | The total freight of the order in the Customer's currency |
tax | number (double) | false | The total tax for the order in the Customer's currency |
discount | number (double) | false | The total discount for the order in the Customer's currency |
tax_rate | number (double) | false | The tax rate of the order |
total | number (double) | false | The total amount of the order in the Customer's currency |
ordered_date | string (date-time) | false | The UTC date the order was created on. |
additional_information | OrderAdditionalInformation | false | none |
Enumerated Values
Property | Value |
---|---|
order_status | New |
order_status | Processing |
order_status | Shipped |
order_status | PartiallyShipped |
order_status | Complete |
order_status | Cancelled |
order_status | Received |
order_status | RefundRequested |
order_status | Refunded |
order_status | RefundRejected |
order_status | StockConfirmed |
order_status | StockPartiallyConfirmed |
order_status | ReadyForPickup |
order_status | PartiallyReadyForPickup |
PriceDiscount
{
"id": 12321,
"object": "discount",
"client_identifier": "",
"percent_discount": 25,
"discount_level_id": 0
}
The PriceDiscount
object contains information for sku level discounts.
A PriceDiscount
will be attached to a DiscountLevel
and have a percent discount value from 0 to 100.
A PriceDiscount
will have an associated DisccountLevel
and a percent discount from 0 to 100.
Properties
Name | Type | Required | Description |
---|---|---|---|
id | integer (int64) | false | The primary identifier of the Discount. |
object | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
percent_discount | number (double) ¦ null | false | The discount percentage. This must be a value from 0 to 100. |
discount_level_id | integer (int64) | false | The ID of the DiscountLevel that the Discount is attached to. |
PriceDiscountRequest
{
"id": 997,
"client_identifier": "",
"name": "loyalty discount",
"discount_level_id": 999,
"percent_discount": 25
}
The request object used to create or update a Discount.
The Discount
object contains information about Discounts associated with a Discount Level.
A Discount
specifies the discount percentage that will
apply to any products of a given brand purchased through an Account
.
A Discount
will have PercentDiscount
, </c>, and <c>DiscountLevel
fields.
Properties
Name | Type | Required | Description |
---|---|---|---|
id | integer (int64) | false | The ID associated with the Discount. |
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
name | string ¦ null | false | The name of the discount level. |
discount_level_id | integer (int64) | false | The ID of the DiscountLevel that the Discount is attached to. |
percent_discount | number (double) ¦ null | false | The discount percentage. This must be a value from 0 to 100. |
PriceDiscounts
{
"object": "list",
"data": [
{}
],
"has_more": true,
"total_items": 0,
"url": "string",
"count": 0
}
A list of object that can be accessed by index.
Properties
Name | Type | Required | Description |
---|---|---|---|
object | string ¦ null | false | A string describing the object type returned. |
data | [PriceDiscount] ¦ null | false | A list containing the actual response elements, paginated by any request parameters. |
has_more | boolean | false | Whether or not there are more elements available after this set. If false ,this set comprises the end of the list. |
total_items | integer (int64) | false | The total number of items that can be returned by the endpoint resource with the current search parameters. |
url | string ¦ null | false | The URL for accessing this list. |
count | integer (int32) | false | Gets the number of elements contained in the List. |
Product
{
"id": 4245,
"library_product_id": 4245,
"object": "product",
"client_identifier": "string",
"name": "WX Series Explosion-Proof Gas Catalytic Heater",
"short_name": "WX Series",
"short_description": "WX Series Infrared Gas Catalytic Explosion-Proof Heaters.",
"primary_image": "https://productimage.com/image.png",
"brand_id": 124483,
"brand": {
"client_identifier": "",
"name": "Brand Name",
"alias": "Brand Alias",
"id": 92590,
"object": "brand",
"created_on": "2020-12-01T08:00:00.000Z"
},
"quantity_discount_id": 124483,
"quantity_discount": {
"client_identifier": "string",
"id": 8,
"object": "QuantityDiscount",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"is_active": true,
"combine_with_other_products_using_same_discount": true,
"apply_to_sale_price": true,
"show_percentage_off": true,
"show_product_discounts": true,
"show_sku_discounts": true,
"calculation": "OverrideDiscountLevelPercentDiscount",
"tiers": [],
"discount_levels": []
},
"created_on": "2019-08-24T14:15:22Z",
"url": "https://domain.com/product/x1D"
}
The Product
object contains information about products.
An Product
will have a name, short name, short description, brand, and sku information.
Properties
Name | Type | Required | Description |
---|---|---|---|
id | integer (int64) | false | The primary identifier of the Product |
library_product_id | integer (int64) ¦ null | false | The ID of the Library Product that the product is attached to. |
object | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
name | string ¦ null | false | The name of the product. |
short_name | string ¦ null | false | The short name of the product. Used when displaying the product in smaller spaces. |
short_description | string ¦ null | false | A short summary of the product |
primary_image | string ¦ null | false | The primary image of the product |
brand_id | integer (int64) ¦ null | false | The ID of the Brand that the product is attached to. |
brand | Brand | false | The Brand object contains information about brands.A brand is a term, name or design that is associated with a number of sellers, goods or products. A brand represents the identity or personality of a given set of products. Brands may manufacturer and sell their products through their own seller or through multiple sellers. A Brand will have a name, alias, and list of related Product . |
quantity_discount_id | integer (int64) ¦ null | false | The ID of the QuantityDiscount that the product is attached to. |
quantity_discount | QuantityDiscount | false | The QuantityDiscount object contains information about quantity discount rules. |
created_on | string (date-time) | false | When the product was added to your catalog |
url | string (uri) ¦ null | false | The Url to the product |
QuantityDiscount
{
"client_identifier": "string",
"id": 8,
"object": "QuantityDiscount",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"is_active": true,
"combine_with_other_products_using_same_discount": true,
"apply_to_sale_price": true,
"show_percentage_off": true,
"show_product_discounts": true,
"show_sku_discounts": true,
"calculation": "OverrideDiscountLevelPercentDiscount",
"tiers": [
{}
],
"discount_levels": [
{}
]
}
The QuantityDiscount object contains information about quantity discount rules.
Properties
Name | Type | Required | Description |
---|---|---|---|
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
id | integer (int64) | false | The primary identifier of the Quantity Discount. |
object | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
created_on | string (date-time) | false | When the QuantityDiscount was created. |
name | string ¦ null | false | Gets or sets the name of the quantity discount. |
is_active | boolean | false | Gets or sets the is active property of the quantity dicount |
combine_with_other_products_using_same_discount | boolean | false | If true, you can combine two or more different SKU's to achieve the quantity for a quantity discount. |
apply_to_sale_price | boolean | false | If true, the discount will be applied to the sale price of a SKU. Otherwise, it will use the lower of the Sale Price, or applied discount. |
show_percentage_off | boolean | false | Show the percent discount on the inventory list. |
show_product_discounts | boolean | false | Show the quantity discount information at the top of the product page. |
show_sku_discounts | boolean | false | Show the quantity discount information on each SKU line item. |
calculation | string | false | Determine how quantity discounts are calculated when a discount level is also applied. |
tiers | [QuantityDiscountTier] ¦ null | false | The line items for the quantity discount when there is no discount level applied. |
discount_levels | [QuantityDiscountDiscountLevel] ¦ null | false | The line items for the quantity discount for each discount level. |
Enumerated Values
Property | Value |
---|---|
calculation | OverrideDiscountLevelPercentDiscount |
calculation | CascadePercentDiscount |
calculation | CombinePercentDiscount |
QuantityDiscountDiscountLevel
{
"id": 99089,
"name": "DISCOUNT-LEVEL-1",
"tiers": [
{}
]
}
Each discount level associated to a quantity discount.
Properties
Name | Type | Required | Description |
---|---|---|---|
id | integer (int64) | false | The primary identifier of the Discount Level |
name | string ¦ null | false | The name of the Discount Level |
tiers | [QuantityDiscountTier] ¦ null | false | Each quantity discount tier associated to the discount level. |
QuantityDiscountRequest
{
"client_identifier": "string",
"name": "Main Office",
"is_active": true,
"combine_with_other_products_using_same_discount": true,
"apply_to_sale_price": true,
"show_percentage_off": true,
"show_product_discounts": true,
"show_sku_discounts": true,
"calculation": "OverrideDiscountLevelPercentDiscount",
"tiers": [
{}
],
"discount_levels": [
{}
]
}
The request object used to create or update an QuantityDiscount.
The QuantityDiscount
object contains information about a product or SKUs quantity discounts
Properties
Name | Type | Required | Description |
---|---|---|---|
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
name | string ¦ null | false | Gets or sets the name of the quantity discount. |
is_active | boolean | false | Gets or sets the is active property of the quantity dicount |
combine_with_other_products_using_same_discount | boolean | false | If true, you can combine two or more different SKU's to achieve the quantity for a quantity discount. |
apply_to_sale_price | boolean | false | If true, the discount will be applied to the sale price of a SKU. Otherwise, it will use the lower of the Sale Price, or applied discount. |
show_percentage_off | boolean | false | Show the percent discount on the inventory list. |
show_product_discounts | boolean | false | Show the quantity discount information at the top of the product page. |
show_sku_discounts | boolean | false | Show the quantity discount information on each SKU line item. |
calculation | string | false | Determine how quantity discounts are calculated when a discount level is also applied. |
tiers | [QuantityDiscountTier] ¦ null | false | The line items for the quantity discount when there is no discount level applied. |
discount_levels | [QuantityDiscountDiscountLevel] ¦ null | false | The line items for the quantity discount for each discount level. |
Enumerated Values
Property | Value |
---|---|
calculation | OverrideDiscountLevelPercentDiscount |
calculation | CascadePercentDiscount |
calculation | CombinePercentDiscount |
QuantityDiscountTier
{
"id": 99089,
"quantity": 5,
"percent_discount": 15
}
Each tier associated to a quantity discount.
Properties
Name | Type | Required | Description |
---|---|---|---|
id | integer (int64) | false | The primary identifier of the Tier |
quantity | integer (int32) | false | The minimum quantity needed to apply the quantity discount tier. |
percent_discount | number (double) | false | The percent discount to apply for the quantity discount tier. |
QuantityDiscounts
{
"object": "list",
"data": [
{}
],
"has_more": true,
"total_items": 0,
"url": "string",
"count": 0
}
A list of object that can be accessed by index.
Properties
Name | Type | Required | Description |
---|---|---|---|
object | string ¦ null | false | A string describing the object type returned. |
data | [QuantityDiscount] ¦ null | false | A list containing the actual response elements, paginated by any request parameters. |
has_more | boolean | false | Whether or not there are more elements available after this set. If false ,this set comprises the end of the list. |
total_items | integer (int64) | false | The total number of items that can be returned by the endpoint resource with the current search parameters. |
url | string ¦ null | false | The URL for accessing this list. |
count | integer (int32) | false | Gets the number of elements contained in the List. |
Quote
{
"id": 8,
"object": "quote",
"client_identifier": "string",
"quote_number": "ORD-000009158381-123",
"customer_id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"customer": {
"id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"object": "customer",
"first_name": "John",
"last_name": "Smit",
"company_name": "Widgets Inc",
"email_address": "john@widgetsinc.com",
"phone_number": "555-123-1234",
"account_id": 12,
"account_name": "Widgets Inc",
"account_number": "123456",
"discount_level_id": 14,
"discount_level_name": "PRICELEVEL-1"
},
"items": [
{}
],
"currency_code": "CAD",
"seller_currency_code": "USD",
"quote_status": "Processing",
"activation_date": "2020-12-01T08:00:00.000Z",
"sent_to_customer_date": "2020-12-01T08:00:00.000Z",
"customer_reference": "Pipeline 2021-10-06",
"completion_date": "2020-12-01T08:00:00.000Z",
"order_id": 74,
"expiry_days": 30,
"expiry_date": "2020-12-01T08:00:00.000Z",
"address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"store_comments": "",
"customer_comments": "",
"documents": [
{}
],
"url": "https://domain.com/quote/x1D",
"attachment_url": "string"
}
The Quote object contains information about the sales quote. An quote is a customer's completed request to purchase one or more products from a shop.
An quote is created when a customer completes the checkout process, during which time they provide an email address or phone number, billing address and payment information.
Properties
Name | Type | Required | Description |
---|---|---|---|
id | integer (int64) | false | The primary identifier of the Quote |
object | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
quote_number | string ¦ null | false | A unique identifier for the quote |
customer_id | string ¦ null | false | The primary identifier for the customer |
customer | Customer | false | none |
items | [QuoteItem] ¦ null | false | A list of line item objects, each containing information about an item in the quote. |
currency_code | string ¦ null | false | The three letter code (ISO 4217) for the currency used for the payment. |
seller_currency_code | string ¦ null | false | The three letter code (ISO 4217) for the store's currency. |
quote_status | string | false | Quote statuses are limited to the following pre-defined values: - New - Customer has not activated quote. - Active - Customer sent quote to seller. - Expired - Customer did not purchase order in time. - Cancelled - Customer or seller cancelled quote. - Complete - Quote has been purchased, and has been shipped. - Accepted - Customer accepted quote but hasn't purchased. - AcceptedOrdered - Quote has purchased the quote, but the order has not shipped. - ProposalSent - Quote has been reviewed by the seller, and sent to the customer. - Declined - Customer or seller declined the quote. - Draft - Customer or seller has not submitted the quote. |
activation_date | string (date-time) ¦ null | false | The UTC date the quote was sent to the seller on. |
sent_to_customer_date | string (date-time) ¦ null | false | The UTC date the quote was sent to the customer on. |
customer_reference | string ¦ null | false | The primary identifier supplied by the customer |
completion_date | string (date-time) ¦ null | false | The UTC date the quote was purchased on. |
order_id | integer (int64) ¦ null | false | The primary identifier of the order |
expiry_days | integer (int32) ¦ null | false | The number of days, the quote is active for |
expiry_date | string (date-time) ¦ null | false | The UTC date the quote can no longer be purchased on. |
address | Address | false | The Address object contains information about a place, or location. Examples are - Offices - Warehouses - Shipping Addresses - Billing Addresses |
store_comments | string ¦ null | false | Any comments supplied by the store |
customer_comments | string ¦ null | false | Any comments supplied by the customer |
documents | [QuoteDocument] ¦ null | false | Any documents attached to the quote. |
url | string (uri) ¦ null | false | The Url to the quote for the customer |
attachment_url | string ¦ null | false | Attachment url sent when activating a quote. |
Enumerated Values
Property | Value |
---|---|
quote_status | New |
quote_status | Active |
quote_status | Expired |
quote_status | Cancelled |
quote_status | Complete |
quote_status | Accepted |
quote_status | AcceptedOrdered |
quote_status | QuoteSent |
quote_status | Declined |
quote_status | Draft |
quote_status | Deleted |
quote_status | Closed |
quote_status | CustomerCancelled |
quote_status | AllActive |
QuoteCancelOptions
{
"expand": [
"string"
],
"message": "string"
}
Properties
Name | Type | Required | Description |
---|---|---|---|
expand | [string] ¦ null | false | Array of strings for child properties to expand. |
message | string ¦ null | false | none |
QuoteConfirmOptions
{
"expand": [
"string"
],
"message": "string",
"expiry_date": "2019-08-24T14:15:22Z",
"resend_email": true
}
Properties
Name | Type | Required | Description |
---|---|---|---|
expand | [string] ¦ null | false | Array of strings for child properties to expand. |
message | string ¦ null | false | none |
expiry_date | string (date-time) ¦ null | false | none |
resend_email | boolean | false | none |
QuoteDocument
{
"id": 8,
"object": "quote",
"url": "https://documents.yodify.com/quotes/",
"file_name": "string"
}
Properties
Name | Type | Required | Description |
---|---|---|---|
id | integer (int64) | false | The primary identifier of the Quote |
object | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
url | string ¦ null | false | The public URL for the file. |
file_name | string ¦ null | false | The file name for the file. |
QuoteDocumentUpdateOptions
{
"expand": [
"string"
],
"document": {
"can_read": true,
"can_write": true,
"can_seek": true,
"can_timeout": true,
"length": 0,
"position": 0,
"read_timeout": 0,
"write_timeout": 0
},
"file_name": "string"
}
Properties
Name | Type | Required | Description |
---|---|---|---|
expand | [string] ¦ null | false | Array of strings for child properties to expand. |
document | Stream | false | none |
file_name | string ¦ null | false | none |
QuoteDocuments
{
"object": "list",
"data": [
{}
],
"has_more": true,
"total_items": 0,
"url": "string",
"count": 0
}
A list of object that can be accessed by index.
Properties
Name | Type | Required | Description |
---|---|---|---|
object | string ¦ null | false | A string describing the object type returned. |
data | [QuoteDocument] ¦ null | false | A list containing the actual response elements, paginated by any request parameters. |
has_more | boolean | false | Whether or not there are more elements available after this set. If false ,this set comprises the end of the list. |
total_items | integer (int64) | false | The total number of items that can be returned by the endpoint resource with the current search parameters. |
url | string ¦ null | false | The URL for accessing this list. |
count | integer (int32) | false | Gets the number of elements contained in the List. |
QuoteItem
{
"id": 0,
"object": "quoteitem",
"client_identifier": "string",
"sku_id": 4434,
"sku": {
"id": 99089,
"object": "sku",
"client_identifier": "string",
"store_product_id": 1188203,
"library_product_id": 1188203,
"product": {},
"brand": {},
"sku_identifier": "PDA111-1",
"manufacturer_part_number": "PDA111-1",
"short_description": "string",
"description": "",
"list_price": 75.99,
"sale_price": 45.99,
"is_on_sale": true,
"sale_start_date": "2020-12-01T08:00:00.000Z",
"sale_end_date": "2020-12-31T21:00:00.000Z",
"sale_maximum_quantity": 0,
"sale_minimum_quantity": 0,
"sale_label": "string",
"inventory": 45,
"unit_of_measure": "EACH",
"unit_of_measure_quantity": 1,
"inventory_alert": 0,
"is_featured": true,
"always_in_stock": true,
"shipping_rate_id": 2,
"shipping_rate": {},
"address_id": 3,
"address": {},
"quantity_discount_id": 3,
"quantity_discount": {},
"allow_backorders": true,
"lead_time_from": 7,
"lead_time_to": 15,
"lead_time_message": "15",
"price_discounts": [],
"is_non_refundable": true,
"is_non_refundable_message": "string",
"length": 15,
"width": 7,
"height": 5,
"weight": 1500,
"classification": "string",
"unspsc_classification": "string",
"price_visibility": "InheritFromProduct",
"created_on": "2020-12-01T08:00:00.000Z",
"modified_on": "2020-12-01T08:00:00.000Z",
"login_for_pricing_message": "string",
"in_stock_message": "string",
"out_of_stock_message": "string",
"request_quote": true
},
"quote_id": 8,
"product_id": 225,
"product": {
"id": 4245,
"library_product_id": 4245,
"object": "product",
"client_identifier": "string",
"name": "WX Series Explosion-Proof Gas Catalytic Heater",
"short_name": "WX Series",
"short_description": "WX Series Infrared Gas Catalytic Explosion-Proof Heaters.",
"primary_image": "https://productimage.com/image.png",
"brand_id": 124483,
"brand": {},
"quantity_discount_id": 124483,
"quantity_discount": {},
"created_on": "2019-08-24T14:15:22Z",
"url": "https://domain.com/product/x1D"
},
"quantity": 4,
"model_number": "string",
"price_per_unit": 0,
"seller_price_per_unit": 0,
"add_ons": [
{}
],
"optional": true,
"minimum_quantity": 0,
"maximum_quantity": 0,
"store_comments": "",
"customer_comments": "",
"lead_time_from": 0,
"lead_time_to": 0,
"options": [
{}
]
}
The Quote Item object contains information about items belonging to a quote.
Properties
Name | Type | Required | Description |
---|---|---|---|
id | integer (int64) | false | Primary identifier for the line item |
object | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
sku_id | integer (int64) | false | The ID of the SKU that the Quote Item is attached to. |
sku | Sku | false | The SKU object contains information about inventory and pricing for a Store. An SKU will have a internal name identifier, manufacturer part number, inventory, pricing, and other information related fields for the SKU. |
quote_id | integer (int64) | false | The ID of the Quote that the Quote Item is attached to. |
product_id | integer (int64) | false | The ID of the Product that the Quote Item is attached to. |
product | Product | false | The Product object contains information about products. An Product will have a name, short name, short description, brand, and sku information. |
quantity | integer (int32) | false | The number of items that were purchased. |
model_number | string ¦ null | false | The item's MPN (Manufacturer's Part Number). |
price_per_unit | number (double) | false | Customer's Price of each item |
seller_price_per_unit | number (double) | false | Sellers's Price of each item |
add_ons | [QuoteItemAddOn] ¦ null | false | A list of add-ons that are attached to the quote items |
optional | boolean | false | Whether or not the item can be removed by the customer during checkout |
minimum_quantity | integer (int32) | false | The minimum number of items that the customer must purchase |
maximum_quantity | integer (int32) | false | The maximum number of items that the customer can purchase |
store_comments | string ¦ null | false | Any comments supplied by the store |
customer_comments | string ¦ null | false | Any comments supplied by the customer |
lead_time_from | integer (int32) | false | The minimum number of days it will take to ship the item |
lead_time_to | integer (int32) | false | The maximum number of days it will take to ship the item |
options | [QuoteItemOption] ¦ null | false | The options attached to quote item |
QuoteItemAddOn
{
"id": 0,
"add_on_id": 0,
"object": "quoteitem",
"client_identifier": "string",
"quantity": 4,
"model_number": "string",
"price_per_unit": 0,
"configuration": "string",
"lead_time_from": 0,
"lead_time_to": 0,
"optional": true,
"minimum_quantity": 0,
"maximum_quantity": 0,
"items": [
{}
]
}
Additional components or features that can be added to a quote item
Properties
Name | Type | Required | Description |
---|---|---|---|
id | integer (int64) | false | Primary identifier for the quote item add-on |
add_on_id | integer (int64) | false | Primary identifier for the add-on |
object | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
quantity | integer (int32) | false | The number of items that were purchased. |
model_number | string ¦ null | false | The item's MPN (Manufacturer's Part Number). |
price_per_unit | number (double) ¦ null | false | Customer's Price of each item |
configuration | string ¦ null | false | JSON of the items configured for the add-on |
lead_time_from | integer (int32) ¦ null | false | The minimum number of days it will take to ship the item |
lead_time_to | integer (int32) ¦ null | false | The maximum number of days it will take to ship the item |
optional | boolean ¦ null | false | Whether or not the item can be removed by the customer during checkout |
minimum_quantity | integer (int32) ¦ null | false | The minimum number of items that the customer must purchase |
maximum_quantity | integer (int32) ¦ null | false | The maximum number of items that the customer can purchase |
items | [AddOnInput] ¦ null | false | List of add-on configuration data |
QuoteItemAddOnRequest
{
"id": 0,
"add_on_id": 0,
"client_identifier": "string",
"quantity": 4,
"model_number": "string",
"price_per_unit": 0,
"configuration": "string",
"lead_time_from": 0,
"lead_time_to": 0,
"optional": true,
"minimum_quantity": 0,
"maximum_quantity": 0,
"items": [
{}
]
}
Additional components or features that can be added to a quote item
Properties
Name | Type | Required | Description |
---|---|---|---|
id | integer (int64) ¦ null | false | Primary identifier for the quote item add-on |
add_on_id | integer (int64) | false | Primary identifier for the add-on |
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
quantity | integer (int32) | false | The number of items that were purchased. |
model_number | string ¦ null | false | The item's MPN (Manufacturer's Part Number). |
price_per_unit | number (double) ¦ null | false | Customer's Price of each item |
configuration | string ¦ null | false | JSON of the items configured for the add-on |
lead_time_from | integer (int32) ¦ null | false | The minimum number of days it will take to ship the item |
lead_time_to | integer (int32) ¦ null | false | The maximum number of days it will take to ship the item |
optional | boolean ¦ null | false | Whether or not the item can be removed by the customer during checkout |
minimum_quantity | integer (int32) ¦ null | false | The minimum number of items that the customer must purchase |
maximum_quantity | integer (int32) ¦ null | false | The maximum number of items that the customer can purchase |
items | [AddOnInput] ¦ null | false | List of add-on configuration data |
QuoteItemOption
{
"id": 8,
"object": "quoteitemoption",
"name": "Enclosure Material",
"value": "Stainless Steel",
"contribution": "RAD",
"user_input": "1.5"
}
Properties
Name | Type | Required | Description |
---|---|---|---|
id | integer (int64) | false | The ID of the Option that the selection is attached to. |
object | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
name | string ¦ null | false | The name of the group of the option |
value | string ¦ null | false | The value name of the option |
contribution | string ¦ null | false | The string that the selection has contributed to the item's model number |
user_input | string ¦ null | false | The input that the user has provided for a customizable selection |
QuoteItemRequest
{
"id": 0,
"client_identifier": "string",
"sku_id": 4434,
"product_id": 225,
"quantity": 4,
"model_number": "string",
"price_per_unit": 0,
"seller_price_per_unit": 0,
"add_ons": [
{}
],
"optional": true,
"minimum_quantity": 0,
"maximum_quantity": 0,
"store_comments": "",
"customer_comments": "",
"lead_time_from": 0,
"lead_time_to": 0,
"options": [
{}
],
"type": 0
}
The Quote Item object contains information about items belonging to a quote.
Properties
Name | Type | Required | Description |
---|---|---|---|
id | integer (int64) ¦ null | false | Primary identifier for the line item, null if it is a new quote item. |
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
sku_id | integer (int64) ¦ null | false | The ID of the SKU that the Quote Item is attached to. |
product_id | integer (int64) | false | The ID of the Product that the Quote Item is attached to. |
quantity | integer (int32) | false | The number of items that were purchased. |
model_number | string ¦ null | false | The item's MPN (Manufacturer's Part Number). |
price_per_unit | number (double) | false | Customer's Price of each item |
seller_price_per_unit | number (double) | false | Sellers's Price of each item |
add_ons | [QuoteItemAddOnRequest] ¦ null | false | A list of add-ons that are attached to the quote items |
optional | boolean | false | Whether or not the item can be removed by the customer during checkout |
minimum_quantity | integer (int32) ¦ null | false | The minimum number of items that the customer must purchase |
maximum_quantity | integer (int32) ¦ null | false | The maximum number of items that the customer can purchase |
store_comments | string ¦ null | false | Any comments supplied by the store |
customer_comments | string ¦ null | false | Any comments supplied by the customer |
lead_time_from | integer (int32) ¦ null | false | The minimum number of days it will take to ship the item |
lead_time_to | integer (int32) ¦ null | false | The maximum number of days it will take to ship the item |
options | [QuoteItemOption] ¦ null | false | The selected configurator options for the item |
type | integer (int32) | false | The product type for the item. 1 is a library product. 2 is an exclusive product |
QuoteRequest
{
"client_identifier": "string",
"quote_number": "ORD-000009158381-123",
"customer_id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"customer": {
"id": "e49fe4dd-b087-439f-8897-bcfc84b5dacc",
"object": "customer",
"first_name": "John",
"last_name": "Smit",
"company_name": "Widgets Inc",
"email_address": "john@widgetsinc.com",
"phone_number": "555-123-1234",
"account_id": 12,
"account_name": "Widgets Inc",
"account_number": "123456",
"discount_level_id": 14,
"discount_level_name": "PRICELEVEL-1"
},
"items": [
{}
],
"currency_code": "CAD",
"quote_status": "Processing",
"activation_date": "2020-12-01T08:00:00.000Z",
"sent_to_customer_date": "2020-12-01T08:00:00.000Z",
"customer_reference": "Pipeline 2021-10-06",
"completion_date": "2020-12-01T08:00:00.000Z",
"order_id": 74,
"expiry_days": 30,
"expiry_date": "2020-12-01T08:00:00.000Z",
"address": {
"client_identifier": "string",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"store_comments": "",
"customer_comments": "",
"industry": "",
"estimated_shipping": 0
}
The Quote object contains information about the sales quote. An quote is a customer's completed request to purchase one or more products from a shop.
An quote is created when a customer completes the checkout process, during which time they provide an email address or phone number, billing address and payment information.
Properties
Name | Type | Required | Description |
---|---|---|---|
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
quote_number | string ¦ null | false | A unique identifier for the quote |
customer_id | string ¦ null | false | The primary identifier for the customer |
customer | Customer | false | none |
items | [QuoteItemRequest] ¦ null | false | A list of line item objects, each containing information about an item in the quote. |
currency_code | string ¦ null | false | The three letter code (ISO 4217) for the currency used for the payment. |
quote_status | string | false | Quote statuses are limited to the following pre-defined values: - New - Customer has not activated quote. - Active - Customer sent quote to seller. - Expired - Customer did not purchase order in time. - Cancelled - Customer or seller cancelled quote. - Complete - Quote has been purchased, and has been shipped. - Accepted - Customer accepted quote but hasn't purchased. - AcceptedOrdered - Quote has purchased the quote, but the order has not shipped. - ProposalSent - Quote has been reviewed by the seller, and sent to the customer. - Declined - Customer or seller declined the quote. - Draft - Customer or seller has not submitted the quote. |
activation_date | string (date-time) ¦ null | false | The UTC date the quote was sent to the seller on. |
sent_to_customer_date | string (date-time) ¦ null | false | The UTC date the quote was sent to the customer on. |
customer_reference | string ¦ null | false | The primary identifier supplied by the customer |
completion_date | string (date-time) ¦ null | false | The UTC date the quote was purchased on. |
order_id | integer (int64) ¦ null | false | The primary identifier of the order |
expiry_days | integer (int32) ¦ null | false | The number of days, the quote is active for |
expiry_date | string (date-time) ¦ null | false | The UTC date the quote can no longer be purchased on. |
address | AddressRequest | false | The request object used to create or update an Address. The Address object contains information about a place, or location.Examples are - Offices - Warehouses - Shipping Addresses - Billing Addresses |
store_comments | string ¦ null | false | Any comments supplied by the store |
customer_comments | string ¦ null | false | Any comments supplied by the customer |
industry | string ¦ null | false | Industry the customer belongs to |
estimated_shipping | number (double) ¦ null | false | How much shipping will likely charge |
Enumerated Values
Property | Value |
---|---|
quote_status | New |
quote_status | Active |
quote_status | Expired |
quote_status | Cancelled |
quote_status | Complete |
quote_status | Accepted |
quote_status | AcceptedOrdered |
quote_status | QuoteSent |
quote_status | Declined |
quote_status | Draft |
quote_status | Deleted |
quote_status | Closed |
quote_status | CustomerCancelled |
quote_status | AllActive |
Quotes
{
"object": "list",
"data": [
{}
],
"has_more": true,
"total_items": 0,
"url": "string",
"count": 0
}
A list of object that can be accessed by index.
Properties
Name | Type | Required | Description |
---|---|---|---|
object | string ¦ null | false | A string describing the object type returned. |
data | [Quote] ¦ null | false | A list containing the actual response elements, paginated by any request parameters. |
has_more | boolean | false | Whether or not there are more elements available after this set. If false ,this set comprises the end of the list. |
total_items | integer (int64) | false | The total number of items that can be returned by the endpoint resource with the current search parameters. |
url | string ¦ null | false | The URL for accessing this list. |
count | integer (int32) | false | Gets the number of elements contained in the List. |
SearchResult
{
"id": 8,
"object": "search_result",
"name": "WX Series Explosion-Proof Gas Catalytic Heater",
"short_name": "WX Series",
"primary_image": "https://productimage.com/image.png",
"url": "https://domain.com/product/x1D",
"short_description": "WX Series Infrared Gas Catalytic Explosion-Proof Heaters.",
"brand_name": "Brand Name",
"type": "Product",
"related": [
{}
]
}
Properties
Name | Type | Required | Description |
---|---|---|---|
id | integer (int64) | false | The primary identifier of the search result |
object | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
name | string ¦ null | false | The name of the search result. |
short_name | string ¦ null | false | The short name of the search result. |
primary_image | string ¦ null | false | The primary image of the search result |
url | string (uri) ¦ null | false | The Url to the search result |
short_description | string ¦ null | false | A short summary of the search result |
brand_name | string ¦ null | false | If the Type is Product or Inventory the name of the Brand will also be supplied. |
type | string ¦ null | false | The type of the search result |
related | [SearchResultRelated] ¦ null | false | Related items to the search result -- Types include, Category, SKU, Tag |
SearchResultRelated
{
"id": 8,
"name": "WX Series Explosion-Proof Gas Catalytic Heater",
"other_name": "Pressure Switches > Hazardous Pressure Switch",
"short_description": "WX Series Infrared Gas Catalytic Explosion-Proof Heaters.",
"type": "Category"
}
Properties
Name | Type | Required | Description |
---|---|---|---|
id | integer (int64) | false | The primary identifier of the related search result |
name | string ¦ null | false | The name of the search result. |
other_name | string ¦ null | false | If the related record has a different display |
short_description | string ¦ null | false | A short summary of the search result |
type | string ¦ null | false | The type of the related search result |
SearchResults
{
"object": "list",
"data": [
{}
],
"has_more": true,
"total_items": 0,
"url": "string",
"count": 0
}
A list of object that can be accessed by index.
Properties
Name | Type | Required | Description |
---|---|---|---|
object | string ¦ null | false | A string describing the object type returned. |
data | [SearchResult] ¦ null | false | A list containing the actual response elements, paginated by any request parameters. |
has_more | boolean | false | Whether or not there are more elements available after this set. If false ,this set comprises the end of the list. |
total_items | integer (int64) | false | The total number of items that can be returned by the endpoint resource with the current search parameters. |
url | string ¦ null | false | The URL for accessing this list. |
count | integer (int32) | false | Gets the number of elements contained in the List. |
Shipment
{
"id": 3543,
"object": "shipment",
"client_identifier": "string",
"order_id": 2,
"shipped_date": "2020-12-01T08:00:00.000Z",
"estimated_delivery_date": "2020-12-08T08:00:00.000Z",
"tracking_number": "2000000002",
"tracking_url": "https://www.fedex.com/apps/fedextrack/?action=track%26trackingnumber=2000000002%26cntry_code=ca%26locale=en_CA",
"carrier": "FedEx",
"items": [
{}
],
"add_ons": [
{}
],
"shipment_type": "Tracked",
"created_on": "2020-12-01T08:00:00.000Z",
"trackings": [
{}
],
"address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"status": "InTransit"
}
The Shipment
object contains information about shipments for an order.
An order can be sent out in multiple shipments, or as a single one. Shipments will have a
status that indicates the shipment's current tracking status.
If a shipment was created as a tracked shipment, the status will be upated automatically, otherwise,
the seller will need to provide manual updates.
A Shipment
will have a tracking number, url, carrier and other fields related to shipment tracking.
Properties
Name | Type | Required | Description |
---|---|---|---|
id | integer (int64) | false | The primary identifier of the Shipment |
object | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
order_id | integer (int64) | false | The ID of the Order that the Shipment is attached to. |
shipped_date | string (date-time) ¦ null | false | The UTC date the Shipment was shipped. |
estimated_delivery_date | string (date-time) ¦ null | false | The UTC date of when Shipment is expected to be delivered. |
tracking_number | string ¦ null | false | The tracking number of the shipment. |
tracking_url | string ¦ null | false | External url where the customer can go to track their shipment. |
carrier | string ¦ null | false | Name of the carrier/courier. If shipment type is Tracked. It must match one of the values in /api/v1/Shipments/Carriers |
items | [ShipmentItem] ¦ null | false | List of items attached to the shipment. When creating a shipment, leave items empty to attach all remaining items to the shipment automatically. |
add_ons | [ShipmentAddOn] ¦ null | false | List of addons attached to the shipment. When creating a shipment, leave items empty to attach all remaining addons to the shipment automatically. |
shipment_type | string | false | Gets the shipment type. - Tracked - If carrier name matches list, all information will be updated from the carrier. - Custom - All information must be supplied and updated by the seller. |
created_on | string (date-time) | false | The UTC date the Shipment was created on. |
trackings | [ShipmentTracking] ¦ null | false | Tracking history of the shipment/ |
address | Address | false | The Address object contains information about a place, or location. Examples are - Offices - Warehouses - Shipping Addresses - Billing Addresses |
status | string | false | Gets the shipment status. - New - Shipment has not been supplied a Shipped Date yet. - Pending - Shipment has not been submitted to the carrier yet. - InfoReceived - Carrier has received information, but not picked up the shipment yet. - InTransit - Carrier has picked up the shipment, and is on route. - OutForDelivery - Shipment has left the carrier depot, and is out for delivery. - AttemptFail - Carrier could not delivery shipment to customer. - Delivered - Carrier successfully delivered shipment to customer. - AvailableForPickup - Customer must pick up shipment from carrier. - Exception - Something went wrong. - Expired - Took too long for carrier to receive the package. - ReturnToSender - Shipment is being returned to the sender. |
Enumerated Values
Property | Value |
---|---|
shipment_type | Tracked |
shipment_type | Custom |
shipment_type | Pickup |
status | New |
status | Pending |
status | InfoReceived |
status | InTransit |
status | OutForDelivery |
status | AttemptFail |
status | Delivered |
status | AvailableForPickup |
status | Exception |
status | Expired |
status | ReturnToSender |
status | PickedUp |
status | Unknown |
ShipmentAddOn
{
"id": 3543,
"object": "shipmentitem",
"order_item_id": 34,
"order_item_add_on_id": 4,
"quantity": 3
}
The Shipment AddOn contains information about add-ons attached to a shipment.
Properties
Name | Type | Required | Description |
---|---|---|---|
id | integer (int64) | false | The primary identifier of the Shipment Add-On |
object | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
order_item_id | integer (int64) | false | The ID of the OrderItem that the Shipment Item is attached to. |
order_item_add_on_id | integer (int64) ¦ null | false | The ID of the OrderItemAddOn that the Shipment Add-On is attached to. |
quantity | integer (int32) ¦ null | false | The quantity of the item being shipped. Leave empty to ship all remaining items. |
ShipmentItem
{
"id": 3543,
"object": "shipmentitem",
"order_item_id": 34,
"sku_id": 4434,
"quantity": 3
}
The Shipment Item contains information about items attached to a shipment.
Properties
Name | Type | Required | Description |
---|---|---|---|
id | integer (int64) | false | The primary identifier of the Shipment Item |
object | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
order_item_id | integer (int64) | false | The ID of the OrderItem that the Shipment Item is attached to. |
sku_id | integer (int64) ¦ null | false | Optional: The ID of the SKU that the Shipment Item is attached to. |
quantity | integer (int32) ¦ null | false | The quantity of the item being shipped. Leave empty to ship all remaining items. |
ShipmentItemAddOnRequest
{
"order_item_add_on_id": 34,
"quantity": 3
}
The request object used to create or update a Shipment Add-On.
The Shipment Add-On contains information about items attached to a shipment.
Properties
Name | Type | Required | Description |
---|---|---|---|
order_item_add_on_id | integer (int64) | false | The ID of the OrderItemAddOn that the Shipment Item Add-On is attached to. |
quantity | integer (int32) ¦ null | false | The quantity of the item being shipped. Leave empty to ship all remaining items. |
ShipmentItemRequest
{
"order_item_id": 34,
"sku_id": 4434,
"quantity": 3,
"add_ons": [
{}
]
}
The request object used to create or update a Shipment Item.
The Shipment Item contains information about items attached to a shipment.
Properties
Name | Type | Required | Description |
---|---|---|---|
order_item_id | integer (int64) | false | The ID of the OrderItem that the Shipment Item is attached to. |
sku_id | integer (int64) ¦ null | false | Optional: The ID of the SKU that the Shipment Item is attached to. |
quantity | integer (int32) ¦ null | false | The quantity of the item being shipped. Leave empty to ship all remaining items. |
add_ons | [ShipmentItemAddOnRequest] ¦ null | false | List of items attached to the shipment. Include this list of AddOns to create or update Shipment AddOns for the Shipment. |
ShipmentRequest
{
"client_identifier": "string",
"order_id": 2,
"shipped_date": "2020-12-01T08:00:00.000Z",
"estimated_delivery_date": "2020-12-08T08:00:00.000Z",
"tracking_number": "2000000002",
"tracking_url": "https://www.fedex.com/apps/fedextrack/?action=track%26trackingnumber=2000000002%26cntry_code=ca%26locale=en_CA",
"carrier": "FedEx",
"items": [
{}
],
"shipment_type": "Tracked",
"send_email": true,
"address_id": 12345
}
The request object used to create or update a Shipment.
The Shipment
object contains information about shipments for an order.
An order can be sent out in multiple shipments, or as a single one. Shipments will have a
status that indicates the shipment's current tracking status.
If a shipment was created as a tracked shipment, the status will be upated automatically, otherwise,
the seller will need to provide manual updates.
A Shipment
will have a tracking number, url, carrier and other fields related to shipment tracking.
Properties
Name | Type | Required | Description |
---|---|---|---|
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
order_id | integer (int64) | false | The ID of the Order that the Shipment is attached to. |
shipped_date | string (date-time) ¦ null | false | The UTC date the Shipment was shipped. |
estimated_delivery_date | string (date-time) ¦ null | false | The UTC date of when Shipment is expected to be delivered. |
tracking_number | string ¦ null | false | The tracking number of the shipment. |
tracking_url | string ¦ null | false | External url where the customer can go to track their shipment. |
carrier | string ¦ null | false | Name of the carrier/courier. If shipment type is Tracked. It must match one of the values in /api/v1/Shipments/Carriers |
items | [ShipmentItemRequest] ¦ null | false | List of items attached to the shipment. When creating a shipment, leave items empty to attach all remaining items to the shipment automatically. Include this list of ShipmentItem to create or update Shipment Items for the Shipment. |
shipment_type | string | false | Gets the shipment type. - Tracked - If carrier name matches list, all information will be updated from the carrier. - Custom - All information must be supplied and updated by the seller. |
send_email | boolean | false | Send a system generated email to the customer, set to false if using your own emails. |
address_id | integer (int64) ¦ null | false | If the ShipmentType is Pickup then this references the Pickup Location. |
Enumerated Values
Property | Value |
---|---|
shipment_type | Tracked |
shipment_type | Custom |
shipment_type | Pickup |
ShipmentTracking
{
"object": "shipmenttracking",
"message": "Arrived at Post Office",
"status": "InTransit",
"city": "Houston",
"country": "United States",
"state": "Texas",
"zip": "12345",
"date": "2019-08-24T14:15:22Z"
}
The Shipment Item contains information about items attached to a shipment.
Properties
Name | Type | Required | Description |
---|---|---|---|
object | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
message | string ¦ null | false | Description of the scan event |
status | string | false | Status of the package at the time of the scan event, possible values are "Unknown", "New", "Pending", "InfoReceived", "InTransit", "OutForDelivery", "Delivered", "AttemptFail", "AvailableForPickup", "Expired", "ReturnToSender" or "Exception" |
city | string ¦ null | false | The city where the scan event occurred (if available) |
country | string ¦ null | false | The country where the scan event occurred (if available) |
state | string ¦ null | false | The state or province where the scan event occurred (if available) |
zip | string ¦ null | false | The postal code where the scan event occurred (if available) |
date | string (date-time) ¦ null | false | The timestamp when the tracking scan occurred |
Enumerated Values
Property | Value |
---|---|
status | New |
status | Pending |
status | InfoReceived |
status | InTransit |
status | OutForDelivery |
status | AttemptFail |
status | Delivered |
status | AvailableForPickup |
status | Exception |
status | Expired |
status | ReturnToSender |
status | PickedUp |
status | Unknown |
Shipments
{
"object": "list",
"data": [
{}
],
"has_more": true,
"total_items": 0,
"url": "string",
"count": 0
}
A list of object that can be accessed by index.
Properties
Name | Type | Required | Description |
---|---|---|---|
object | string ¦ null | false | A string describing the object type returned. |
data | [Shipment] ¦ null | false | A list containing the actual response elements, paginated by any request parameters. |
has_more | boolean | false | Whether or not there are more elements available after this set. If false ,this set comprises the end of the list. |
total_items | integer (int64) | false | The total number of items that can be returned by the endpoint resource with the current search parameters. |
url | string ¦ null | false | The URL for accessing this list. |
count | integer (int32) | false | Gets the number of elements contained in the List. |
ShippingAddress
{
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
}
The mailing address to where the order will be shipped.
Properties
Name | Type | Required | Description |
---|---|---|---|
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
id | integer (int64) | false | The primary identifier of the Address. |
object | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
created_on | string (date-time) | false | When the address was created. |
name | string ¦ null | false | Gets or sets the name of the address. |
first_name | string ¦ null | false | The first name of the address contact. |
last_name | string ¦ null | false | The last name of the address contact. |
company_name | string ¦ null | false | The company name of the address contact. |
city | string ¦ null | false | Gets or sets the city. |
state_code | string ¦ null | false | The two-letter abbreviation of the state or province. |
country_code | string ¦ null | false | The two-letter code (ISO 3166-1 alpha-2 two-letter country code) for the country. |
street1 | string ¦ null | false | The primary street address. |
street2 | string ¦ null | false | Optional field for additional information for the street address. |
postal_code | string ¦ null | false | The zip or postal code |
phone_number | string ¦ null | false | The phone number |
is_primary | boolean | false | Is this your main address. Not updateable |
is_warehouse | boolean | false | Is this address only a warehouse? Will not show up on contact pages when true. |
ShippingRate
{
"id": 4,
"object": "shippingrate",
"client_identifier": "string",
"name": "Heavy Items",
"shipping_economy": 9.99,
"shipping_economy_additional": 5.99,
"is_free_shipping": false,
"economy_days_from": 5,
"economy_days_to": 7,
"shipping_priority": 9.99,
"shipping_priority_additional": 5.99,
"is_free_shipping_priority": false,
"priority_days_from": 1,
"priority_days_to": 3,
"international_shipping_economy": 9.99,
"international_shipping_economy_additional": 6.99,
"is_free_international_shipping": false,
"international_economy_days_from": 7,
"international_economy_days_to": 30,
"international_shipping_priority": 9.99,
"international_shipping_priority_additional": 6.99,
"is_free_international_shipping_priority": false,
"international_priority_days_from": 1,
"international_priority_days_to": 3,
"is_default": false,
"notes": ""
}
The Shipping Rate object contains information about shipping prices and times for a Store. A Shipping Rate will have an internal name identifier, information about local and non local shipping pricing and delivery estimates and other information related fields for the Shipping Rate.
Properties
Name | Type | Required | Description |
---|---|---|---|
id | integer (int64) | false | The primary identifier of the Shipping Rate |
object | string ¦ null | false | The object type |
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
name | string ¦ null | false | The name of the Shipping Rate. For internal use only. |
shipping_economy | number (double) ¦ null | false | The base cost for an item to be shipped using an economy shipment to your local regions. |
shipping_economy_additional | number (double) ¦ null | false | The additional cost for every item past the first item using an economy shipment to your local regions. |
is_free_shipping | boolean | false | Will override any ShippingEconomy and ShippingEconomyAdditional rates to 0 |
economy_days_from | integer (int32) ¦ null | false | The minimum amount of days to normally ship an item to your local regions using an economy shipment. |
economy_days_to | integer (int32) ¦ null | false | The maximum amount of days to normally ship an item to your local regions using an economy shipment. |
shipping_priority | number (double) ¦ null | false | The base cost for an item to be shipped using an priority shipment to your local regions. |
shipping_priority_additional | number (double) ¦ null | false | The additional cost for every item past the first item using an priority shipment to your local regions. |
is_free_shipping_priority | boolean | false | Will override any ShippingPriority and ShippingPriorityAdditional rates to 0 |
priority_days_from | integer (int32) ¦ null | false | The minimum amount of days to normally ship an item to your local regions using a priority shipment. |
priority_days_to | integer (int32) ¦ null | false | The maximum amount of days to normally ship an item to your local regions using a priority shipment. |
international_shipping_economy | number (double) ¦ null | false | The base cost for an item to be shipped using an economy shipment to outside your local regions. |
international_shipping_economy_additional | number (double) ¦ null | false | The additional cost for every item past the first item using an economy shipment to outside your local regions. |
is_free_international_shipping | boolean | false | Will override any InternationalShippingEconomy and InternationalShippingEconomyAdditional rates to 0 |
international_economy_days_from | integer (int32) ¦ null | false | The minimum amount of days to normally ship an item to outside your local regions using a economy shipment. |
international_economy_days_to | integer (int32) ¦ null | false | The maximum amount of days to normally ship an item to outside your local regions using a economy shipment. |
international_shipping_priority | number (double) ¦ null | false | The base cost for an item to be shipped using a priority shipment to your local regions. |
international_shipping_priority_additional | number (double) ¦ null | false | The additional cost for every item past the first item using an priority shipment to outside your local regions. |
is_free_international_shipping_priority | boolean | false | Will override any InternationalShippingPriority and InternationalShippingPriorityAdditional rates to 0 |
international_priority_days_from | integer (int32) ¦ null | false | The minimum amount of days to normally ship an item to your outside local regions using a priority shipment. |
international_priority_days_to | integer (int32) ¦ null | false | The maximum amount of days to normally ship an item to outside your local regions using a priority shipment. |
is_default | boolean | false | Your default shipping rate will be applied to all SKUs that have not specified a different shipping ate. |
notes | string ¦ null | false | Notes for internal use only. |
ShippingRateRequest
{
"client_identifier": "string",
"name": "Heavy Items",
"shipping_economy": 9.99,
"shipping_economy_additional": 5.99,
"is_free_shipping": false,
"economy_days_from": 5,
"economy_days_to": 7,
"shipping_priority": 9.99,
"shipping_priority_additional": 5.99,
"is_free_shipping_priority": false,
"priority_days_from": 1,
"priority_days_to": 3,
"international_shipping_economy": 9.99,
"international_shipping_economy_additional": 6.99,
"is_free_international_shipping": false,
"international_economy_days_from": 7,
"international_economy_days_to": 30,
"international_shipping_priority": 9.99,
"international_shipping_priority_additional": 6.99,
"is_free_international_shipping_priority": false,
"international_priority_days_from": 1,
"international_priority_days_to": 3,
"is_default": false,
"notes": ""
}
The request object used to create or update a Shipment Rate.
The Shipping Rate object contains information about shipping prices and times for a Store. A Shipping Rate will have an internal name identifier, information about local and non local shipping pricing and delivery estimates and other information related fields for the Shipping Rate.
Properties
Name | Type | Required | Description |
---|---|---|---|
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
name | string ¦ null | false | The name of the Shipping Rate. For internal use only. |
shipping_economy | number (double) ¦ null | false | The base cost for an item to be shipped using an economy shipment to your local regions. |
shipping_economy_additional | number (double) ¦ null | false | The additional cost for every item past the first item using an economy shipment to your local regions. |
is_free_shipping | boolean | false | Will override any ShippingEconomy and ShippingEconomyAdditional rates to 0 |
economy_days_from | integer (int32) ¦ null | false | The minimum amount of days to normally ship an item to your local regions using an economy shipment. |
economy_days_to | integer (int32) ¦ null | false | The maximum amount of days to normally ship an item to your local regions using an economy shipment. |
shipping_priority | number (double) ¦ null | false | The base cost for an item to be shipped using an priority shipment to your local regions. |
shipping_priority_additional | number (double) ¦ null | false | The additional cost for every item past the first item using an priority shipment to your local regions. |
is_free_shipping_priority | boolean | false | Will override any ShippingPriority and ShippingPriorityAdditional rates to 0 |
priority_days_from | integer (int32) ¦ null | false | The minimum amount of days to normally ship an item to your local regions using a priority shipment. |
priority_days_to | integer (int32) ¦ null | false | The maximum amount of days to normally ship an item to your local regions using a priority shipment. |
international_shipping_economy | number (double) ¦ null | false | The base cost for an item to be shipped using an economy shipment to outside your local regions. |
international_shipping_economy_additional | number (double) ¦ null | false | The additional cost for every item past the first item using an economy shipment to outside your local regions. |
is_free_international_shipping | boolean | false | Will override any InternationalShippingEconomy and InternationalShippingEconomyAdditional rates to 0 |
international_economy_days_from | integer (int32) ¦ null | false | The minimum amount of days to normally ship an item to outside your local regions using a economy shipment. |
international_economy_days_to | integer (int32) ¦ null | false | The maximum amount of days to normally ship an item to outside your local regions using a economy shipment. |
international_shipping_priority | number (double) ¦ null | false | The base cost for an item to be shipped using a priority shipment to your local regions. |
international_shipping_priority_additional | number (double) ¦ null | false | The additional cost for every item past the first item using an priority shipment to outside your local regions. |
is_free_international_shipping_priority | boolean | false | Will override any InternationalShippingPriority and InternationalShippingPriorityAdditional rates to 0 |
international_priority_days_from | integer (int32) ¦ null | false | The minimum amount of days to normally ship an item to your outside local regions using a priority shipment. |
international_priority_days_to | integer (int32) ¦ null | false | The maximum amount of days to normally ship an item to outside your local regions using a priority shipment. |
is_default | boolean | false | Your default shipping rate will be applied to all SKUs that have not specified a different shipping ate. |
notes | string ¦ null | false | Notes for internal use only. |
ShippingRates
{
"object": "list",
"data": [
{}
],
"has_more": true,
"total_items": 0,
"url": "string",
"count": 0
}
A list of object that can be accessed by index.
Properties
Name | Type | Required | Description |
---|---|---|---|
object | string ¦ null | false | A string describing the object type returned. |
data | [ShippingRate] ¦ null | false | A list containing the actual response elements, paginated by any request parameters. |
has_more | boolean | false | Whether or not there are more elements available after this set. If false ,this set comprises the end of the list. |
total_items | integer (int64) | false | The total number of items that can be returned by the endpoint resource with the current search parameters. |
url | string ¦ null | false | The URL for accessing this list. |
count | integer (int32) | false | Gets the number of elements contained in the List. |
Sku
{
"id": 99089,
"object": "sku",
"client_identifier": "string",
"store_product_id": 1188203,
"library_product_id": 1188203,
"product": {
"id": 4245,
"library_product_id": 4245,
"object": "product",
"client_identifier": "string",
"name": "WX Series Explosion-Proof Gas Catalytic Heater",
"short_name": "WX Series",
"short_description": "WX Series Infrared Gas Catalytic Explosion-Proof Heaters.",
"primary_image": "https://productimage.com/image.png",
"brand_id": 124483,
"brand": {},
"quantity_discount_id": 124483,
"quantity_discount": {},
"created_on": "2019-08-24T14:15:22Z",
"url": "https://domain.com/product/x1D"
},
"brand": {
"client_identifier": "",
"name": "Brand Name",
"alias": "Brand Alias",
"id": 92590,
"object": "brand",
"created_on": "2020-12-01T08:00:00.000Z"
},
"sku_identifier": "PDA111-1",
"manufacturer_part_number": "PDA111-1",
"short_description": "string",
"description": "",
"list_price": 75.99,
"sale_price": 45.99,
"is_on_sale": true,
"sale_start_date": "2020-12-01T08:00:00.000Z",
"sale_end_date": "2020-12-31T21:00:00.000Z",
"sale_maximum_quantity": 0,
"sale_minimum_quantity": 0,
"sale_label": "string",
"inventory": 45,
"unit_of_measure": "EACH",
"unit_of_measure_quantity": 1,
"inventory_alert": 0,
"is_featured": true,
"always_in_stock": true,
"shipping_rate_id": 2,
"shipping_rate": {
"id": 4,
"object": "shippingrate",
"client_identifier": "string",
"name": "Heavy Items",
"shipping_economy": 9.99,
"shipping_economy_additional": 5.99,
"is_free_shipping": false,
"economy_days_from": 5,
"economy_days_to": 7,
"shipping_priority": 9.99,
"shipping_priority_additional": 5.99,
"is_free_shipping_priority": false,
"priority_days_from": 1,
"priority_days_to": 3,
"international_shipping_economy": 9.99,
"international_shipping_economy_additional": 6.99,
"is_free_international_shipping": false,
"international_economy_days_from": 7,
"international_economy_days_to": 30,
"international_shipping_priority": 9.99,
"international_shipping_priority_additional": 6.99,
"is_free_international_shipping_priority": false,
"international_priority_days_from": 1,
"international_priority_days_to": 3,
"is_default": false,
"notes": ""
},
"address_id": 3,
"address": {
"client_identifier": "string",
"id": 8,
"object": "address",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"first_name": "string",
"last_name": "string",
"company_name": "string",
"city": "Main Office",
"state_code": "TX",
"country_code": "US",
"street1": "915 W Dallas St",
"street2": "Unit 112",
"postal_code": "77019",
"phone_number": "+1 713-123-1234",
"is_primary": true,
"is_warehouse": true
},
"quantity_discount_id": 3,
"quantity_discount": {
"client_identifier": "string",
"id": 8,
"object": "QuantityDiscount",
"created_on": "2020-12-01T08:00:00.000Z",
"name": "Main Office",
"is_active": true,
"combine_with_other_products_using_same_discount": true,
"apply_to_sale_price": true,
"show_percentage_off": true,
"show_product_discounts": true,
"show_sku_discounts": true,
"calculation": "OverrideDiscountLevelPercentDiscount",
"tiers": [],
"discount_levels": []
},
"allow_backorders": true,
"lead_time_from": 7,
"lead_time_to": 15,
"lead_time_message": "15",
"price_discounts": [
{}
],
"is_non_refundable": true,
"is_non_refundable_message": "string",
"length": 15,
"width": 7,
"height": 5,
"weight": 1500,
"classification": "string",
"unspsc_classification": "string",
"price_visibility": "InheritFromProduct",
"created_on": "2020-12-01T08:00:00.000Z",
"modified_on": "2020-12-01T08:00:00.000Z",
"login_for_pricing_message": "string",
"in_stock_message": "string",
"out_of_stock_message": "string",
"request_quote": true
}
The SKU object contains information about inventory and pricing for a Store. An SKU will have a internal name identifier, manufacturer part number, inventory, pricing, and other information related fields for the SKU.
Properties
Name | Type | Required | Description |
---|---|---|---|
id | integer (int64) | false | The primary identifier of the SKU |
object | string ¦ null | false | String representing the type of object. Objects of this type will have the same data structure. |
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
store_product_id | integer (int64) | false | Store specific product identifier that the SKU is attached to. |
library_product_id | integer (int64) ¦ null | false | Library specific product identifier that the SKU is attached to. |
product | Product | false | The Product object contains information about products. An Product will have a name, short name, short description, brand, and sku information. |
brand | Brand | false | The Brand object contains information about brands.A brand is a term, name or design that is associated with a number of sellers, goods or products. A brand represents the identity or personality of a given set of products. Brands may manufacturer and sell their products through their own seller or through multiple sellers. A Brand will have a name, alias, and list of related Product . |
sku_identifier | string ¦ null | false | The unique SKU (stock keeping unit) of the inventory item. |
manufacturer_part_number | string ¦ null | false | The part number provided by the manufacturer. |
short_description | string ¦ null | false | A short description detailing the SKU. Useful for differentiating between other SKU's. |
description | string ¦ null | false | The full description of the SKU. |
list_price | number (double) ¦ null | false | The SKU's price displayed when not on sale. |
sale_price | number (double) ¦ null | false | The SKU's price displayed when it is on sale. |
is_on_sale | boolean | false | Turn the sale price of the product on if all criteria are met. - Sale price less than list price - Sale start date empty or less than today - Sale end date empty or greater than today |
sale_start_date | string (date-time) ¦ null | false | The UTC date and time when a SKU's sale price takes effect. |
sale_end_date | string (date-time) ¦ null | false | The UTC date and time when a sku's sale price ends. |
sale_maximum_quantity | integer (int32) ¦ null | false | The maximum number of sale items a customer can buy at a time. |
sale_minimum_quantity | integer (int32) ¦ null | false | The minimum number of sale items a customer can buy at a time. |
sale_label | string ¦ null | false | The message displayed when an item is on sale. For example, Clearance, Limited Time Only, While Supplies Last, Open Box. |
inventory | number (double) | false | The amount of inventory available for purchase. |
unit_of_measure | string ¦ null | false | The unit of measurement of the SKU |
unit_of_measure_quantity | number (double) ¦ null | false | The number of units belonging to the Unit of Measure |
inventory_alert | integer (int32) ¦ null | false | The amount when you want to be notified when the SKU's inventory drops below. |
is_featured | boolean | false | This SKU will show higher in the priority when set to True |
always_in_stock | boolean | false | The SKU will always be display as in stock to the customer. |
shipping_rate_id | integer (int64) ¦ null | false | Shipping rate the SKU is attached to. |
shipping_rate | ShippingRate | false | The Shipping Rate object contains information about shipping prices and times for a Store. A Shipping Rate will have an internal name identifier, information about local and non local shipping pricing and delivery estimates and other information related fields for the Shipping Rate. |
address_id | integer (int64) ¦ null | false | Address the SKU is attached to. |
address | Address | false | The Address object contains information about a place, or location. Examples are - Offices - Warehouses - Shipping Addresses - Billing Addresses |
quantity_discount_id | integer (int64) ¦ null | false | Quantity Discount the SKU is attached to. |
quantity_discount | QuantityDiscount | false | The QuantityDiscount object contains information about quantity discount rules. |
allow_backorders | boolean | false | When the SKU is out of stock, allow the customer to purchase. |
lead_time_from | integer (int32) ¦ null | false | The minimum amount of time (in days), when the SKU is out of stock, that the SKU will take to ship. |
lead_time_to | integer (int32) ¦ null | false | The maximum amount of time (in days), when the SKU is out of stock, that the SKU will take to ship. |
lead_time_message | string ¦ null | false | A custom message that will be used to show customers lead times instead of the automatically generated message. |
price_discounts | [PriceDiscount] ¦ null | false | The discounts for customers attached to accounts. |
is_non_refundable | boolean | false | Displays a message to the customer that the SKU is non-refundable at time of purchase. |
is_non_refundable_message | string ¦ null | false | Displays a custom message to the customer that the SKU is non-refundable at time of purchase. |
length | number (double) ¦ null | false | The length of the SKU in cm |
width | number (double) ¦ null | false | The width of the SKU in cm |
height | number (double) ¦ null | false | The height of the SKU in cm |
weight | number (double) ¦ null | false | The length of the SKU in grams |
classification | string ¦ null | false | The ABC classisfication of the SKU |
unspsc_classification | string ¦ null | false | The UNSPSC classisfication of the SKU |
price_visibility | string | false |
|
created_on | string (date-time) | false | The UTC date and time when a SKU was created. |
modified_on | string (date-time) | false | The UTC date and time when a SKU was last modified. |
login_for_pricing_message | string ¦ null | false | Override the log in for price message with the provided message |
in_stock_message | string ¦ null | false | Override the in stock message with the provided message |
out_of_stock_message | string ¦ null | false | Override the out of stock message with the provided message |
request_quote | boolean ¦ null | false | Set's the item so that it can only be added to a quote, and not the shopping cart. Inventory and pricing will still show. |
Enumerated Values
Property | Value |
---|---|
price_visibility | InheritFromProduct |
price_visibility | ShowPricingToAllCustomers |
price_visibility | ShowPricingToOnlyAccountCustomers |
price_visibility | ShowPricingToOnlyLoggedInCustomers |
price_visibility | HidePricingToAllCustomers |
SkuAdjustInventoryOptions
{
"inventory_adjustment": 5
}
Properties
Name | Type | Required | Description |
---|---|---|---|
inventory_adjustment | number (double) | false | Adjust the inventory level by a value |
SkuRequest
{
"client_identifier": "string",
"library_product_id": 1188203,
"store_product_id": 1188203,
"sku_identifier": "PDA111-1",
"manufacturer_part_number": "PDA111-1",
"short_description": "string",
"description": "",
"list_price": 75.99,
"sale_price": 45.99,
"is_on_sale": true,
"sale_start_date": "2020-12-01T08:00:00.000Z",
"sale_end_date": "2020-12-31T21:00:00.000Z",
"sale_maximum_quantity": 0,
"sale_label": "string",
"sale_minimum_quantity": 0,
"inventory": 45,
"unit_of_measure": "EACH",
"unit_of_measure_quantity": 1,
"always_in_stock": true,
"shipping_rate_id": 2,
"address_id": 3,
"quantity_discount_id": 3,
"allow_backorders": true,
"lead_time_from": 7,
"lead_time_to": 15,
"lead_time_message": "15",
"price_discounts": [
{}
],
"add_ons": [
{}
],
"is_non_refundable": true,
"is_non_refundable_message": "string",
"length": 15,
"width": 7,
"height": 5,
"weight": 1500,
"classification": "string",
"unspsc_classification": "string",
"inventory_alert": 0,
"is_featured": true,
"price_visibility": "InheritFromProduct",
"login_for_pricing_message": "string",
"in_stock_message": "string",
"out_of_stock_message": "string",
"request_quote": true
}
The request object used to create or update a SKU.
The SKU object contains information about inventory and pricing for a Store. An SKU will have a internal name identifier, manufacturer part number, inventory, pricing, and other information related fields for the SKU.
Properties
Name | Type | Required | Description |
---|---|---|---|
client_identifier | string ¦ null | false | An identifier provided in the request that will be returned with the response. |
library_product_id | integer (int64) ¦ null | false | Library Product identifier that the SKU is attached to. |
store_product_id | integer (int64) ¦ null | false | Store specific product identifier that the SKU is attached to. |
sku_identifier | string ¦ null | false | The unique SKU (stock keeping unit) of the inventory item. |
manufacturer_part_number | string ¦ null | false | The part number provided by the manufacturer. |
short_description | string ¦ null | false | A short description detailing the SKU. Useful for differentiating between other SKU's. |
description | string ¦ null | false | The full description of the SKU. |
list_price | number (double) ¦ null | false | The SKU's price displayed when not on sale. |
sale_price | number (double) ¦ null | false | The SKU's price displayed when it is on sale. |
is_on_sale | boolean ¦ null | false | Turn the sale price of the product on if all criteria are met. - Sale price less than list price - Sale start date empty or less than today - Sale end date empty or greater than today |
sale_start_date | string (date-time) ¦ null | false | The UTC date and time when a SKU's sale price takes effect. |
sale_end_date | string (date-time) ¦ null | false | The UTC date and time when a sku's sale price ends. |
sale_maximum_quantity | integer (int32) ¦ null | false | The maximum number of sale items a customer can buy at a time. |
sale_label | string ¦ null | false | The message displayed when an item is on sale. For example, Clearance, Limited Time Only, While Supplies Last, Open Box. |
sale_minimum_quantity | integer (int32) ¦ null | false | The minimum number of sale items a customer can buy at a time. |
inventory | number (double) ¦ null | false | The amount of inventory available for purchase. |
unit_of_measure | string ¦ null | false | The unit of measurement of the SKU |
unit_of_measure_quantity | number (double) ¦ null | false | The number of units belonging to the Unit of Measure |
always_in_stock | boolean ¦ null | false | The SKU will always be display as in stock to the customer. |
shipping_rate_id | integer (int64) ¦ null | false | Shipping rate the SKU is attached to. |
address_id | integer (int64) ¦ null | false | Address the SKU is attached to. |
quantity_discount_id | integer (int64) ¦ null | false | Quantity Discount the SKU is attached to. |
allow_backorders | boolean ¦ null | false | When the SKU is out of stock, allow the customer to purchase. |
lead_time_from | integer (int32) ¦ null | false | The minimum amount of time (in days), when the SKU is out of stock, that the SKU will take to ship. |
lead_time_to | integer (int32) ¦ null | false | The maximum amount of time (in days), when the SKU is out of stock, that the SKU will take to ship. |
lead_time_message | string ¦ null | false | A custom message that will be used to show customers lead times instead of the automatically generated message. |
price_discounts | [PriceDiscountRequest] ¦ null | false | The discounts for customers attached to accounts. |
add_ons | [AddOnRequest] ¦ null | false | The add-ons that are available for the sku. |
is_non_refundable | boolean ¦ null | false | Displays a message to the customer that the SKU is non-refundable at time of purchase. |
is_non_refundable_message | string ¦ null | false | Displays a custom message to the customer that the SKU is non-refundable at time of purchase. |
length | number (double) ¦ null | false | The length of the SKU in cm |
width | number (double) ¦ null | false | The width of the SKU in cm |
height | number (double) ¦ null | false | The height of the SKU in cm |
weight | number (double) ¦ null | false | The weight of the SKU in kg |
classification | string ¦ null | false | The ABC classisfication of the SKU |
unspsc_classification | string ¦ null | false | The UNSPSC classisfication of the SKU |
inventory_alert | integer (int32) ¦ null | false | The amount when you want to be notified when the SKU's inventory drops below. |
is_featured | boolean ¦ null | false | This SKU will show higher in the priority when set to True |
price_visibility | string | false |
|
login_for_pricing_message | string ¦ null | false | Override the log in for price message with the provided message |
in_stock_message | string ¦ null | false | Override the in stock message with the provided message |
out_of_stock_message | string ¦ null | false | Override the out of stock message with the provided message |
request_quote | boolean ¦ null | false | Set's the item so that it can only be added to a quote, and not the shopping cart. Inventory and pricing will still show. |
Enumerated Values
Property | Value |
---|---|
price_visibility | InheritFromProduct |
price_visibility | ShowPricingToAllCustomers |
price_visibility | ShowPricingToOnlyAccountCustomers |
price_visibility | ShowPricingToOnlyLoggedInCustomers |
price_visibility | HidePricingToAllCustomers |
SkuUpdateInventoryOptions
{
"inventory": 45,
"unit_of_measure": "EACH",
"unit_of_measure_quantity": 1,
"allow_backorders": true,
"always_in_stock": true,
"lead_time_from": 7,
"lead_time_to": 15
}
Properties
Name | Type | Required | Description |
---|---|---|---|
inventory | number (double) ¦ null | false | The amount of inventory available for purchase. |
unit_of_measure | string ¦ null | false | The unit of measurement of the SKU |
unit_of_measure_quantity | number (double) ¦ null | false | The number of units belonging to the Unit of Measure |
allow_backorders | boolean ¦ null | false | When the SKU is out of stock, allow the customer to purchase. |
always_in_stock | boolean ¦ null | false | The SKU will always be display as in stock to the customer. |
lead_time_from | integer (int32) ¦ null | false | The minimum amount of time (in days), when the SKU is out of stock, that the SKU will take to ship. |
lead_time_to | integer (int32) ¦ null | false | The maximum amount of time (in days), when the SKU is out of stock, that the SKU will take to ship. |
SkuUpdatePriceOptions
{
"list_price": 75.99,
"sale_price": 45.99,
"is_on_sale": true,
"sale_start_date": "2020-12-01T08:00:00.000Z",
"sale_end_date": "2020-12-31T21:00:00.000Z"
}
An object that contains fields for updating the pricing on a SKU. The list price, sale price (if on sale) and sale start and end dates can be set.
Properties
Name | Type | Required | Description |
---|---|---|---|
list_price | number (double) ¦ null | false | The SKU's price displayed when not on sale. |
sale_price | number (double) ¦ null | false | The SKU's price displayed when it is on sale. |
is_on_sale | boolean ¦ null | false | Turn the sale price of the product on if all criteria are met. - Sale price less than list price - Sale start date empty or less than today - Sale end date empty or greater than today |
sale_start_date | string (date-time) ¦ null | false | The UTC date and time when a SKU's sale price takes effect. |
sale_end_date | string (date-time) ¦ null | false | The UTC date and time when a sku's sale price ends. |
Skus
{
"object": "list",
"data": [
{}
],
"has_more": true,
"total_items": 0,
"url": "string",
"count": 0
}
A list of object that can be accessed by index.
Properties
Name | Type | Required | Description |
---|---|---|---|
object | string ¦ null | false | A string describing the object type returned. |
data | [Sku] ¦ null | false | A list containing the actual response elements, paginated by any request parameters. |
has_more | boolean | false | Whether or not there are more elements available after this set. If false ,this set comprises the end of the list. |
total_items | integer (int64) | false | The total number of items that can be returned by the endpoint resource with the current search parameters. |
url | string ¦ null | false | The URL for accessing this list. |
count | integer (int32) | false | Gets the number of elements contained in the List. |
Stream
{
"can_read": true,
"can_write": true,
"can_seek": true,
"can_timeout": true,
"length": 0,
"position": 0,
"read_timeout": 0,
"write_timeout": 0
}
Properties
Name | Type | Required | Description |
---|---|---|---|
can_read | boolean | false | none |
can_write | boolean | false | none |
can_seek | boolean | false | none |
can_timeout | boolean | false | none |
length | integer (int64) | false | none |
position | integer (int64) | false | none |
read_timeout | integer (int32) | false | none |
write_timeout | integer (int32) | false | none |
ValidationProblemDetails
{
"errors": {
"property1": [],
"property2": []
},
"detail": "string",
"instance": "/api/v1/accounts",
"status": 400,
"title": "One or more validation errors occurred."
}
A summary of what went wrong during a request. This could include a record not being found, an invalid date range or other invalid value. The status, title, and detail fields will give general information regarding the problem. For more detailed information check the errors list.
Properties
Name | Type | Required | Description |
---|---|---|---|
errors | object ¦ null | false | A list of validation errors associated with the request. |
» additionalProperties | [string] | false | none |
detail | string ¦ null | false | An explanation specific to this occurrence of the problem. |
instance | string ¦ null | false | A URI reference that identifies the occurrence of the problem. |
status | integer (int32) ¦ null | false | The HTTP status code associated with the request. Codes in the 4xx range indicate a failure occurred. Codes in the 5xx range indicates that something went wrong on Yodify's end. Errors: An error will contain the name of the property that failed as well as the reason why it failed. |
title | string ¦ null | false | A short description of the problem that occurred. |