Endpoints

Orders

Search for Orders

Retrieves 25 orders at a time for the vendor account filtered using search query parameters.

Endpoint

GET /orders/

Example:
/orders/?client=true&vendor=true&status=New&sortField=requestedDeliveryDate&creationStartDate=2023-10-01&creationEndDate=2023-10-10&shippingStartDate=2023-10-01&shippingEndDate=2023-10-10&requestedDeliveryStartDate=2023-10-01&requestedDeliveryEndDate=2023-10-10&deliveryStartDate=2023-10-01&deliveryEndDate=2023-10-10&nextToken=eyJhbGciOiJIUzI1NiJ9.eyJwYWdlIjoxLCJ0b3RhbENvdW5

Query Parameters

ParameterTypeDescription
ClientBooleanIndicates if client info should be included in the output
VendorBooleanIndicates if vendor info should be included in the output
StatusType
  • New
  • Processing
  • In-Transit/Shipped
  • Fulfilled
  • Cancelled
Filter results by order status
sortFieldType
  • creationDate
  • requestedDeliveryDate
  • deliveryDate
  • shippingDate
Set the field with which the result will be sorted in descend order
creationStartDateDate (YYYY-mm-dd)Minimum creation date of the orders to be filtered
creationEndDateDate (YYYY-mm-dd)Maximum creation date of the orders to be filtered
requestedDeliveryStartDateDate (YYYY-mm-dd)Minimum requested delivery date of the orders to be filtered
requestedDeliveryEndDateDate (YYYY-mm-dd)Maximum requested delivery date of the orders to be filtered
deliveryStartDateDate (YYYY-mm-dd)Minimum delivery date of the orders to be filtered
deliveryEndDateDate (YYYY-mm-dd)Maximum delivery date of the orders to be filtered
shippingStartDateDate (YYYY-mm-dd)Minimum shipping date of the orders to be filtered
shippingEndDateDate (YYYY-mm-dd)Maximum shipping date of the orders to be filtered
nextTokenStringUse nextToken returned by previous call to the list api to fetch the next set of products

Response

JSON

JavaScript

1{
2    "orders": [
3        {
4            "orderId": 128611362,
5            "clientId": 10706083,
6            "vendorId": 10703800,
7            "clientUserId": 29200211,
8            "vendorUserId": null,
9            "deliveryRouteId": null,
10            "userEmail": "user@bluecart.com",
11            "status": "New",
12            "paymentStatus": null,
13            "deliveryType": "WillCall",
14            "deliveryCharge": 5.0,
15            "deliveryDate": null,
16            "requestedDeliveryDate": "2023-10-25",
17            "shippingDate": null,
18            "currencyCode": "USD",
19            "currencySymbol": "$",
20            "externalPONumber": null,
21            "invoiceNumber": null,
22            "trackingNumber": null,
23            "internalNotes": null,
24            "billingAddress": {
25                "address": "81 E 7th St",
26                "city": "New York",
27                "state": "NY",
28                "zip": "10003"
29            },
30            "shippingAddress": {
31                "address": "81 E 7th St New York NY 95051",
32                "city": "New York",
33                "state": "NY",
34                "zip": "95051"
35            },
36            "isStandingOrder": false,
37            "isPrepaidOrder": false,
38            "isSubmittedByVendor": false,
39            "isPaidByClient": false,
40            "total": 45.6,
41            "client": {
42                "id": 10706083,
43                "name": "New York Coffee",
44                "accountNumber": "RT"
45            },
46            "vendor": {
47                "id": 10703800,
48                "name": "Ruita Test"
49            },
50            "products": [
51                {
52                    "uuid": "45567ebe-38f9-40f2-ac41-29b9c0c533cf",
53                    "productId": 23850243,
54                    "productName": "Bug1",
55                    "lineId": 1,
56                    "quantity": 4,
57                    "price": 11.4,
58                    "basePrice": 11.4,
59                    "totalPrice": 45.6,
60                    "sku": "Bug1",
61                    "unitsOfMeasure": "EA",
62                    "lotNumber": null,
63                    "packUnit": null,
64                    "packPricePerUnit": null,
65                    "quantityPerPack": null,
66                    "isPricedByWeight": false,
67                    "pricePerWeightUnit": null,
68                    "weightUnit": null,
69                    "typicalWeight": null,
70                    "typicalWeightUnit": null,
71                    "shippedWeight": null,
72                    "isDealProduct": null,
73                    "creationDate": "2023-10-20T11:32:37",
74                    "lastUpdateDate": null
75                }
76            ],
77            "creationDate": "2023-10-20T11:32:37",
78            "lastUpdateDate": null
79        },
80        ...
81    ],
82    nextToken: "eyJhbGciOiJIUzI1NiJ9.eyJwYWdlIjoxLCJ0b3RhbENvdW50Ijo5OTksImlhdCI6MTY5Nzg2MDM1MX0.-cv9ABOoBMmcDyOV1DGMKsJXSH6Y7wGY1xmeELeGej4"
83    }

Fields

FieldTypeDescription
OrdersList of Object (Order)Result array of orders
nextTokenStringUse this nextToken to fetch the next set of orders

Retrieve an Order

Retrieves the order for the provided order id.

Endpoint

GET /orders/{id}?client=true&vendor=true

Path Parameters

ParameterTypeDescription
idNumberUnique order id

Query Parameters

ParameterTypeDescription
ClientBooleanIndicates if client info should be included in the output
VendorBooleanIndicates if vendor info should be included in the output

Response

JSON

JavaScript

1{
2    "orderId": 127909754,
3    "clientId": 10706083,
4    "vendorId": 10703800,
5    "clientUserId": 10703801,
6    "vendorUserId": null,
7    "deliveryRouteId": null,
8    "userEmail": null,
9    "status": "Processing",
10    "paymentStatus": null,
11    "deliveryType": "Delivery",
12    "deliveryCharge": 5.0,
13    "deliveryDate": null,
14    "requestedDeliveryDate": "2023-09-10",
15    "shippingDate": null,
16    "currencyCode": "USD",
17    "currencySymbol": "$",
18    "externalPONumber": "65564",
19    "invoiceNumber": "INV123",
20    "trackingNumber": "TR2319",
21    "internalNotes": "Test in prod",
22    "billingAddress": {
23        "address": "Some Av.",
24        "city": "City 1",
25        "state": "State 1",
26        "zip": "102345"
27    },
28    "shippingAddress": {
29        "address": "Some other Av.",
30        "city": "City 2",
31        "state": "State 2",
32        "zip": "102346"
33    },
34    "isStandingOrder": false,
35    "isPrepaidOrder": false,
36    "isSubmittedByVendor": false,
37    "isPaidByClient": false,
38    "total": 305.0,
39    "client": {
40        "id": 10706083,
41        "name": "New York Coffee",
42        "accountNumber": "RT"
43    },
44    "vendor": {
45        "id": 10703800,
46        "name": "Ruita Test"
47    },
48    "products": [
49        {
50            "uuid": null,
51            "productId": 19957215,
52            "productName": "Banana",
53            "lineId": 1,
54            "quantity": 5,
55            "price": 60.0,
56            "basePrice": 60.0,
57            "totalPrice": 300.0,
58            "sku": "1234_dig",
59            "unitsOfMeasure": "LB",
60            "lotNumber": null,
61            "packUnit": null,
62            "packPricePerUnit": null,
63            "quantityPerPack": null,
64            "isPricedByWeight": false,
65            "pricePerWeightUnit": null,
66            "weightUnit": null,
67            "typicalWeight": null,
68            "typicalWeightUnit": null,
69            "shippedWeight": null,
70            "isDealProduct": null,
71            "creationDate": "2023-10-10T13:02:29",
72            "lastUpdateDate": "2023-10-10T13:21:27"
73        }
74    ],
75    "creationDate": "2023-10-10T13:02:29",
76    "lastUpdateDate": "2023-10-10T13:21:27"
77}

Objects

Order

FieldTypeDescription
orderIDNumberID of the order
clientIDNumberID of the client placing the order
vendorIDNumberID of the vendor attending the order
clientUserIDNumberID of the client’s user placing the order (Empty if a vendor’s user is placing the order)
vendorUserIDNumberID of the vendor’s user placing the order for the client (Empty if a client’s user is placing the order)
deliveryRouteIDNumberID of the delivery’s route to be used for the order
userEmailStringEmail of the user placing the order
StatusType
  • New
  • Processing
  • In-Transit/Shipped
  • Fulfilled
  • Cancelled
Current status of the order
paymentStatusType
  • Disputed
  • InvoiceSent
  • None
  • Overdue
  • PaidFull
  • PaidPartial
Current payment status of the order
deliveryTypeType
  • Delivery
  • Local
  • None
  • Pickup
  • Shipment
  • Shipping
  • UPS 3-Day
  • UPS Ground
  • WillCall
Delivery method assigned to the order
deliveryChargeNumberAmount charged for the delivery of the order
deliveryDateDate (YYYY-mm-dd)Real date of the delivery
requestedDeliveryDateDate (YYYY-mm-dd)Requested date of the delivery
shippingDateDate (YYYY-mm-dd)Shipping date of the delivery
currencyCodeType
  • USD
  • CAD
  • EUR
  • MXN
  • GBP
Code of the currency used in the order
currencySymbolStringSymbol of the currency used in the order
externalPONumberStringNumber that identifies the order from the outside for external systems
invoiceNumberStringNumber of the invoice issued for the order
trackingNumberStringTracking number of the order
internalNotesStringNotes added to the order to be used internally
billingAddressObject (Address)Billing address of the order
shippingAddressObject (Address)Shipping address of the order
isStandingOrderBooleanIndicates if the order is a standing order
isPrepaidOrderBooleanIndicates if the order is prepaid
isSubmittedByVendorBooleanIndicates if the order is submitted by the vendor
isPaidByClientBooleanIndicates if the order has been already paid by the client
TotalNumberTotal amount charged for the order (minus delivery)
ClientObject (Client)Client placing the order
VendorObject (Vendor)Vendor attending the order
ProductsArray of Object (OrderProduct)List of products added to the order
creationDateDateTime (YYYY-mm-dd’T’hh:mm:ss)Creation date time of the order
lastUpdateDateDateTime (YYYY-mm-dd’T’hh:mm:ss)Last update date time of the order

OrderProduct

FieldTypeDescription
uuidNumberUnique ID of the product
productIdNumberID of this product in the catalog
productNameStringName of the product in the order
lineIdNumberPosition of this product relative to the other products in the order (used when showing the order detail)
quantityNumberQuantity of the product in the order
priceNumberPrice of the the product in the order
basePriceNumberBase price of the product in the order
totalPriceNumberTotal price for the quantity of products in the order
skuStringSKU of the product in the order
lotNumberStringLot number of the product in the order
packUnitStringUnit of this product’s pack in the order
packPricePerUnitNumberUnit price of this product’s pack in the order
quantityPerPackNumberQuantity of the product’s pack in the order
isPricedByWeightBooleanIndicates if the product is priced by weight in the order
pricePerWeightUnitNumberPrice per unit of weight of the product in the order
weightUnitStringUnit of weight of the product in the order
typicalWeightNumberTypical weight of the product in the order
typicalWeightUnitStringUnit of typical weight of the product in the order
shippedWeightNumberWeight of the product at the moment of the order shipping
isDealProductBooleanIndicates if the product was in deal at the moment the order was placed
creationDateDateTime (YYYY-mm-dd’T’hh:mm:ss)Creation date time of the product
lastUpdateDateDateTime (YYYY-mm-dd’T’hh:mm:ss)Last update date time of the product

Address

FieldTypeDescription
addressStringAddress
cityStringCity
stateStringState
zipStringZip code

Client

FieldTypeDescription
idNumberID of the client placing the order
nameStringName of the client placing the order
accountNumberStringBank account number of the client placing the order

Vendor

FieldTypeDescription
idNumberID of the vendor attending the order
nameStringName of the vendor attending the order

Place an Order

Creates a new order for the provided client and vendor

Endpoint

POST /orders/

Request body

JSON

JavaScript

1{
2    "clientId": 10706083,
3    "user": {
4        "id" : 10703801,
5        "type" : "Client"
6    },
7    "deliveryCharge": 5.0,
8    "deliveryType": "Delivery",
9    "requestedDeliveryDate": "2023-09-10",
10    "shippingDate": null,
11    "currencyCode": "USD",
12    "externalPONumber": "65564",
13    "invoiceNumber": "INV123",
14    "paymentStatus": null,
15    "trackingNumber": "TR2319",
16    "internalNotes": "Test in prod",
17    "comment": "For delivery in prod",
18    "billingAddress": {
19        "address": "Some Av.",
20        "city": "City 1",
21        "state": "State 1",
22        "zip": "102345"
23    },
24    "shippingAddress": {
25        "address": "Some other Av.",
26        "city": "City 2",
27        "state": "State 2",
28        "zip": "102346"
29    },
30    "products": [
31        {
32            "productId": 19957215,
33            "quantity": 5,
34            "note": "prod order product"
35        }
36    ],
37  "presetCreationDate": "2023-10-20"
38}

Objects

Order

FieldTypeDescription
clientIdNumberID of the client placing the order
userObject (User)User placing the order
paymentStatusType
  • Disputed
  • InvoiceSent
  • None
  • Overdue
  • PaidFull
  • PaidPartial
Initial payment status of the order
deliveryTypeType
  • Delivery
  • Local
  • None
  • Pickup
  • Shipment
  • Shipping
  • UPS 3-Day
  • UPS Ground
  • WillCall
Delivery method assigned to the order
requestedDeliveryDateDate (YYYY-mm-dd)Requested date of the delivery
shippingDateDate (YYYY-mm-dd)Shipping date of the delivery
currencyCodeType
  • USD
  • CAD
  • EUR
  • MXN
  • GBP
Code of the currency used in the order
externalPONumberStringNumber that identifies the order from the outside for external systems
invoiceNumberStringNumber of the invoice issued for the order
trackingNumberStringTracking number of the order
internalNotesStringNotes added to the order to be used internally
billingAddressObject (Address)Billing address of the order
shippingAddressObject (Address)Shipping address of the order
ProductsArray of Object (OrderProduct)List of products added to the order
presetCreationDateDateTime (YYYY-mm-dd)Preset creation date of the order if it was previously placed externally

User

FieldTypeDescription
idNumberID of the user placing the order
typeType
  • Vendor
  • Client
Type of the user placing the order

OrderProduct

FieldTypeDescription
productIdNumberID of this product in the catalog
quantityNumberQuantity of the product in the order
priceNumberPrice of the the product in the order
lotNumberStringLot number of the product in the order
noteStringNotes added to the product to be used internally

Address

FieldTypeDescription
addressStringAddress
cityStringCity
stateStringState
zipStringZip code

Response

JSON

JavaScript

1{
2    "order": {
3        "orderId": 10798110,
4        "clientId": 10706083,
5        "user": {
6            "id" : 10703801,
7            "type" : "Client"
8        },
9        "deliveryCharge": 5.0,
10        "deliveryType": "Delivery",
11        "requestedDeliveryDate": "2023-09-10",
12        "shippingDate": null,
13        "currencyCode": "USD",
14        "externalPONumber": "65564",
15        "invoiceNumber": "INV123",
16        "paymentStatus": null,
17        "trackingNumber": "TR2319",
18        "internalOrderNotes": "Test in prod",
19        "comment": "For delivery in prod",
20        "billingAddress": {
21            "address": "Some Av.",
22            "city": "City 1",
23            "state": "State 1",
24            "zip": "102345"
25        },
26        "shippingAddress": {
27            "address": "Some other Av.",
28            "city": "City 2",
29            "state": "State 2",
30            "zip": "102346"
31        },
32        "totalPrice": 105.0,
33        "products": [
34            {
35                "productId": 19957215,
36                "quantity": 7,
37                "price": 15.0,
38                "note": "prod order product",
39                "lotNumber": "prod lot number",
40                "totalPrice": 105.0
41            }
42        ]
43        "creationDate": "2023-10-21T20:09:55"
44    },
45    "warnings": []
46}

Fields

FieldTypeDescription
orderObject (Order)Placed order
warningsList of Object (Warning)Non blocking concerns identified during the order creation

Objects

Order

FieldTypeDescription
orderIdNumberID of the order
clientIdNumberID of the client placing the order
userObject (User)User placing the order
paymentStatusType
  • Disputed
  • InvoiceSent
  • None
  • Overdue
  • PaidFull
  • PaidPartial
Initial payment status of the order
deliveryTypeType
  • Delivery
  • Local
  • None
  • Pickup
  • Shipment
  • Shipping
  • UPS 3-Day
  • UPS Ground
  • WillCall
Delivery method assigned to the order
deliveryChargeNumberAmount to be charged for the delivery of the order
requestedDeliveryDateDate (YYYY-mm-dd)Requested date of the delivery
shippingDateDate (YYYY-mm-dd)Shipping date of the delivery
currencyCodeType
  • USD
  • CAD
  • EUR
  • MXN
  • GBP
Code of the currency used in the order
externalPONumberStringNumber that identifies the order from the outside for external systems
invoiceNumberStringNumber of the invoice issued for the order
trackingNumberStringTracking number of the order
internalNotesStringNotes added to the order to be used internally
commentStringInitial comment to be sent in the webchat of the order
billingAddressObject (Address)Billing address of the order
shippingAddressObject (Address)Shipping address of the order
totalNumberTotal amount charged for the order (minus delivery)
ProductsArray of Object (OrderProduct)List of products added to the order
creationDateDateTime (YYYY-mm-dd’T’hh:mm:ss)Creation date time of the order

OrderProduct

FieldTypeDescription
productIdNumberID of this product in the catalog
quantityNumberQuantity of the product in the order
priceNumberPrice of the the product in the order
lotNumberStringLot number of the product in the order
noteStringNotes added to the product to be used internally
totalPriceNumberTotal price of the product in the order

Warning

FieldTypeDescription
idNumberUUID to identify the warning
codeStringPredefined code to identify the type of the warning
messageStringPredefined message that explains the reason for the warning

Modify an Order

Creates a new order for the provided client and vendor

Endpoint

PUT /orders/{id}

Path Parameters

ParameterTypeDescription
idLongUnique order id

Request body

JSON

JavaScript

1{
2    "userId": 10751092,
3    "status": "Processing",
4    "deliveryCharge": 10.0,
5    "deliveryType": "WillCall",
6    "deliveryDate": "2023-10-10",
7    "shippingDate": "2023-10-15",
8    "externalPONumber": "6556489",
9    "invoiceNumber": "INV12356",
10    "paymentStatus": "Disputed",
11    "trackingNumber": "TR1923",
12    "internalNotes": "Some internal notes",
13    "readyForAccountingSync": true,
14    "notifyCustomer": true,
15    "products": [
16        {
17            "productId": 10751357,
18            "quantity": 3,
19            "note": "note 2 test",
20            "lotNumber": "A2 new"
21        }
22    ]
23}

Objects

Order

FieldTypeDescription
userIdNumberID of the client placing the order
statusType
  • New
  • Processing
  • In-Transit/Shipped
  • Fulfilled
  • Cancelled
Updated status of the order
paymentStatusType
  • Disputed
  • InvoiceSent
  • None
  • Overdue
  • PaidFull
  • PaidPartial
Updated payment status of the order
deliveryTypeType
  • Delivery
  • Local
  • None
  • Pickup
  • Shipment
  • Shipping
  • UPS 3-Day
  • UPS Ground
  • WillCall
Updated delivery method assigned to the order
deliveryChargeNumberUpdated amount to be charged for the delivery of the order
deliveryDateDate (YYYY-mm-dd)Updated date of the delivery
shippingDateDate (YYYY-mm-dd)Updated shipping date of the delivery
externalPONumberStringNumber that identifies the order from the outside for external systems
invoiceNumberStringNumber of the invoice issued for the order
trackingNumberStringTracking number of the order
internalNotesStringNotes added to the order to be used internally
readyForAccountingSyncBooleanIndicates if the order should be in sync with accounting
notifyCustomerBooleanIndicates if the client will be notified of the modified order
ProductsArray of Object (OrderProduct)List of products added to the order

OrderProduct

FieldTypeDescription
productIdNumberID of this product in the catalog
quantityNumberQuantity of the product in the order
priceNumberPrice of the the product in the order
lotNumberStringLot number of the product in the order
noteStringNotes added to the product to be used internally

Response

JSON

JavaScript

1{
2    "userId": 10751092,
3    "status": "Processing",
4    "deliveryCharge": 10.0,
5    "deliveryType": "WillCall",
6    "deliveryDate": "2023-10-10",
7    "shippingDate": "2023-10-15",
8    "externalPONumber": "6556489",
9    "invoiceNumber": "INV12356",
10    "paymentStatus": "Disputed",
11    "trackingNumber": "TR1923",
12    "internalOrderNotes": "Some internal notes",
13    "readyForAccountingSync": true,
14    "notifyCustomer": true,
15    "total": 93.0,
16    "products": [
17        {
18            "productId": 10751357,
19            "quantity": 3,
20            "price": 15.0,
21            "note": "test order product",
22            "lotNumber": "test lot number",
23            "totalPrice": 45.0
24        },
25        {
26            "productId": 10751718,
27            "quantity": 4,
28            "price": 12.0,
29            "note": "note 2 test",
30            "lotNumber": "A2 new",
31            "totalPrice": 48.0
32        }
33    ],
34    "creationDate": "2023-10-11T18:08:47",
35    "lastUpdateDate": "2023-10-21T22:01:53"
36}

Objects

Order

FieldTypeDescription
userIdNumberID of the client placing the order
statusType
  • New
  • Processing
  • In-Transit/Shipped
  • Fulfilled
  • Cancelled
Updated status of the order
paymentStatusType
  • Disputed
  • InvoiceSent
  • None
  • Overdue
  • PaidFull
  • PaidPartial
Updated payment status of the order
deliveryTypeType
  • Delivery
  • Local
  • None
  • Pickup
  • Shipment
  • Shipping
  • UPS 3-Day
  • UPS Ground
  • WillCall
Updated delivery method assigned to the order
deliveryChargeNumberUpdated amount to be charged for the delivery of the order
deliveryDateDate (YYYY-mm-dd)Updated date of the delivery
shippingDateDate (YYYY-mm-dd)Updated shipping date of the delivery
externalPONumberStringNumber that identifies the order from the outside for external systems
invoiceNumberStringNumber of the invoice issued for the order
trackingNumberStringTracking number of the order
internalNotesStringNotes added to the order to be used internally
readyForAccountingSyncBooleanIndicates if the order should be in sync with accounting
notifyCustomerBooleanIndicates if the client will be notified of the modified order
totalNumberUpdated total amount charged for the order (minus delivery)
ProductsArray of Object (OrderProduct)List of products added to the order
creationDateDateTime (YYYY-mm-dd’T’hh:mm:ss)Creation date time of the order
lastUpdateDateDateTime (YYYY-mm-dd’T’hh:mm:ss)Last update date time of the order

OrderProduct

FieldTypeDescription
productIdNumberID of this product in the catalog
quantityNumberQuantity of the product in the order
priceNumberPrice of the the product in the order
lotNumberStringLot number of the product in the order
noteStringNotes added to the product to be used internally
totalPriceNumberTotal price of the product in the order

Products

This is an object that represents a product.

1{
2       	"price": 3.0,
3       	"productId": 7230189,
4       	"productName": "Apples",
5        	"uom": "lb",
6       	"sku": "012",
7       	"packAvgNumberOfUnits": 4.0,
8       	"packPricePerUnit": 0.75,
9       	"packUnit": "each",
10       	"description": "organic",
11       	"productNote": "int prod note",
12       	"enabled": true,
13       	"tags": [
14			{
15		"name": "Fruit"
16	},
17	...
18],
19       	"isPriceByWeight": false,
20       	"weightUnit": "lb",
21       	"typicalWeight": 5.0,
22       	"typicalWeightUnit": "lb",
23       	"typicalLength": 5.0,
24       	"typicalWidth": 5.0,
25       	"typicalHeight": 6.0,
26       	"typicalDistanceUnit": "in",
27		"quantityDiscountMethod": "fixed_price",
28       	"quantityDiscounts": [
29			{
30                    	"quantity": 20.0,
31                    	"fixedPrice": 2.5,
32                    	"amountDiscount": null,
33                    	"percentageDiscount": null
34               	 },
35			...
36],
37       	"barcode": "1",
38       	"brand": "brand name",
39       	"seller": "apple seller",
40       	"metaName": "Apples",
41       	"metaDescription": "organic",
42       	"vendorNotes": "Vendor notes for product",
43       	"countryOfOrigin": "usa",
44       	"variety": "variety",
45       	"vintage": "vintage",
46       	"format": "format",
47       	"vineyard": "vineyard",
48       	"fantasy": "fantasy",
49       	"consignment": "consignment",
50       	"wineType": "consignment"
51       	"appellation": "appellation",
52		"inventory": 33.0,
53    		"manageInventory": "Y",
54    		"special": "N",
55
56}

Retrieve all products

Retrieves 25 products at a time for the account filtered using a search query.

Endpoint

GET /products/?sku=abc123&name=Apple&description=ml

Query Parameters

ParameterTypeDescription
skuStringThe products will be filtered by the given value matching the sku
nameStringThe products will be filtered by the given value matching the name
descriptionStringThe products will be filtered by the given value matching the description
nextTokenStringUse nextToken returned by previous call to the list api to fetch the next set of products

Response

JSON

JavaScript

1{
2	"products": [
3		{
4       	"price": 3.0,
5       	"productId": 7230189,
6       	"productName": "Apples",
7        	"uom": "lb",
8       	"sku": "012",
9       	"packAvgNumberOfUnits": 4.0,
10       	"packPricePerUnit": 0.75,
11       	"packUnit": "each",
12       	"description": "organic",
13       	"productNote": "int product note",
14       	"enabled": false,
15       	"tags": [
16				{
17			"name": "Fruit"
18		},
19		...
20],
21       	"isPriceByWeight": false,
22       	"weightUnit": null,
23       	"typicalWeight": null,
24       	"typicalWeightUnit": null,
25       	"typicalLength": null,
26       	"typicalWidth": null,
27       	"typicalHeight": null,
28       	"typicalDistanceUnit": null,
29 		"quantityDiscountMethod": "fixed_price",
30       	"quantityDiscounts": [
31			{
32                    	"quantity": 20.0,
33                    	"fixedPrice": 2.0,
34                    	"amountDiscount": null,
35                    	"percentageDiscount": null
36               	 },
37			...
38],
39       	"barcode": "1",
40       	"brand": "apple brand",
41       	"seller": "apple seller",
42       	"metaName": "Apples",
43       	"metaDescription": "organic",
44       	"vendorNotes": "Vendor notes",
45       	"countryOfOrigin": "usa",
46       	"variety": "variety",
47       	"vintage": "vintage",
48       	"format": "format",
49       	"vineyard": "vineyard",
50       	"fantasy": "fantasy",
51       	"consignment": "consignment",
52       	"wineType": "wineType",
53       	"appellation": "appellation",
54"inventory": 33.0,
55    		"manageInventory": "Y",
56    		"special": "N"
57	}
58],
59"nextToken": "eyJhbGciOiJIUzI1NiJ9.eyJwYWdlIjoxLCJ0b3RhbENvdW50IjoyNzQsImlhdCI6MTY5NzgxMjYyNX0.xvvdVT3HmQMYAzXJUT9T5PJOKL6Qtk3icOE50LfVdjA"
60}

Objects

Product

FieldTypeDescription
price*DoublePrice should be rounded off to 4 decimal places at the most
productName*StringName for the product
uom*StringUnit of measure for the product
sku*StringSku for the product
packAvgNumberOfUnitsDoubleAverage number of units for the product should be rounded off to 2 decimal places at the most
packPricePerUnitDoublePack unit price should be rounded off to 4 decimal places at the most
packUnitStringPack-size unit of measure
descriptionStringDescription for the product
productNoteStringProduct note
enabledBooleanTrue or false for if product should be enabled or disabled
tagsArray of Object (Tag)Array of product tags
isPriceByWeightBooleanTrue or false if the product should be marked as priced by weight or not
weightUnitStringWeight units from the following
  • G
  • KG
  • OZ
  • LB
typicalWeightDoubleTypical weight for the product
typicalWeightUnitStringWeight units from the following
weight unit
  • G
  • OZ
  • LB
  • KG
Typical weight unit
  • G
  • OZ
  • OZ or LB
  • G or KG
typicalLengthDoubleTypical length for the product
typicalWidthDoubleTypical width for the product
typicalHeightDoubleTypical height for the product
typicalHeightDoubleTypical height for the product
typicalDistanceUnitStringTypical distance unit from the following
  • cm
  • in
  • mm
quantityDiscountMethodStringThe list of values possible if not null
  • amount
  • fixed_price
  • percentage
quantityDiscountsArray of Object (Quantity Discount)quantity discounts array
barcodeStringBarcode value
brandStringBrand name
sellerStringSeller name
metaNameStringmetaname
metaDescriptionStringMeta description
vendorNotesStringVendor notes
countryOfOriginStringCountry of origin
varietyStringVariety
vintageStringVintage
formatStringFormat
vineyardStringVineyard
fantasyStringFantasy
consignmentStringConsignment
wineTypeStringWine Type
appellationStringAppellation
inventoryDoubleOn hand value.
manageInventoryStringEnable/disable inventory
specialStringproduct is marked as special

Fields

FieldTypeDescription
productsArray of Object (Product)Array of products
nextTokenStringUse this nextToken to fetch the next set of products

Retrieve a Product

Retrieves the product for the provided product id.

Endpoint

GET /api/products/{id}

Path Parameters

ParameterTypeDescription
idLongUnique product id

Response

JSON

JavaScript

1{
2       	"price": 3.0,
3       	"productId": 7230189,
4       	"productName": "Apples",
5        	"uom": "lb",
6       	"sku": "012",
7       	"packAvgNumberOfUnits": 4.0,
8       	"packPricePerUnit": 0.75,
9       	"packUnit": "each",
10       	"description": "organic",
11       	"productNote": "int product note",
12       	"enabled": true,
13       	"tags": [
14				{
15			"name": "Fruit"
16		},
17		...
18],
19       	"isPriceByWeight": false,
20       	"weightUnit": null,
21       	"typicalWeight": null,
22       	"typicalWeightUnit": null,
23       	"typicalLength": null,
24       	"typicalWidth": null,
25       	"typicalHeight": null,
26       	"typicalDistanceUnit": null,
27 		"quantityDiscountMethod": "fixed_price",
28       	"quantityDiscounts": [
29			{
30                    	"quantity": 20.0,
31                    	"fixedPrice": 2.0,
32                    	"amountDiscount": null,
33                    	"percentageDiscount": null
34               	 },
35			...
36],
37       	"barcode": "1",
38       	"brand": "apple brand",
39       	"seller": "apple seller",
40       	"metaName": "Apples",
41       	"metaDescription": "organic",
42       	"vendorNotes": "Vendor notes",
43       	"countryOfOrigin": "usa",
44       	"variety": "variety",
45       	"vintage": "vintage",
46       	"format": "format",
47       	"vineyard": "vineyard",
48       	"fantasy": "fantasy",
49       	"consignment": "consignment",
50       	"wineType": "wineType",
51       	"appellation": "appellation",
52"inventory": 33.0,
53    		"manageInventory": "Y",
54   		"special": "N",
55}

Objects

FieldTypeDescription
ProductsObject (Product)Product object for the given id

Create a Product

Creates the product with the provided payload.

Endpoint

POST /api/products/

Request body

JSON

JavaScript

1{
2       	"price": 3.0,
3       	"productName": "Apples",
4        	"uom": "lb",
5       	"sku": "012",
6       	"packAvgNumberOfUnits": 4.0,
7       	"packPricePerUnit": 0.75,
8       	"packUnit": "each",
9       	"description": "organic",
10       	"productNote": "int product note",
11       	"enabled": "Y",
12       	"tags": [
13				{
14			"id": 123
15		},
16		...
17],
18       	"isPriceByWeight": false,
19       	"weightUnit": null,
20       	"typicalWeight": null,
21       	"typicalWeightUnit": null,
22       	"typicalLength": null,
23       	"typicalWidth": null,
24       	"typicalHeight": null,
25       	"typicalDistanceUnit": null,
26 		"quantityDiscountMethod": "fixed_price",
27       	"quantityDiscounts": [
28			{
29                    	"quantity": 20.0,
30                    	"fixedPrice": 2.0,
31                    	"amountDiscount": null,
32                    	"percentageDiscount": null
33               	 },
34			...
35],
36       	"barcode": "1",
37       	"brand": "apple brand",
38       	"seller": "apple seller",
39       	"metaName": "Apples",
40       	"metaDescription": "organic",
41       	"vendorNotes": "Vendor notes",
42       	"countryOfOrigin": "usa",
43       	"variety": "variety",
44       	"vintage": "vintage",
45       	"format": "format",
46       	"vineyard": "vineyard",
47       	"fantasy": "fantasy",
48       	"consignment": "consignment",
49       	"wineType": "wineType",
50       	"appellation": "appellation",
51		"inventory": 33.0,
52     		"manageInventory": "Y",
53   		 "special": "N",
54}

Objects

Tag

FieldTypeDescription
idLongId for the product tag

Quantity Discount

FieldTypeDescription
quantityDoubleQuantity of products
fixedPriceDoubleFixed unit price  If quantityDiscountMethod is “fixed_price” then rounded off to 4 decimal places at the most Else null
amountDiscountDoubleAmount discount to be applied on the product price if quantityDiscountMethod is “amountDiscount” rounded off to 4 decimal points at the most Should not be greater than the product price
percentageDiscountDoublePercentage discount to be applied on the product price if quantityDiscountMethod is “percentageDiscount” rounded off to 4 decimal points at the most Should not be greater than 100

Fields

NameTypeDescription
price*DoublePrice should be rounded off to 4 decimal places at the most
productName*StringName for the product
uom*StringUnit of measure for the product
sku*StringSku for the product
packAvgNumberOfUnitsDoubleAverage number of units for the product should be rounded off to 2 decimal places at the most
packPricePerUnitDoublePack unit price should be rounded off to 4 decimal places at the most
packUnitStringPack-size unit of measure
descriptionStringDescription for the product
productNoteStringProduct note
enabledBooleanTrue or false for if product should be enabled or disabled
tagsArray of Object (Tag)Array of product tags
isPriceByWeightBooleanTrue or false if the product should be marked as priced by weight or not
weightUnitStringWeight units from the following
  • G
  • KG
  • OZ
  • LB
typicalWeightDoubleTypical weight for the product
typicalWeightUnitStringWeight units from the following
weight unit
  • G
  • OZ
  • LB
  • KG
Typical weight unit
  • G
  • OZ
  • OZ or LB
  • G or KG
typicalLengthDoubleTypical length for the product
typicalWidthDoubleTypical width for the product
typicalHeightDoubleTypical height for the product
typicalHeightDoubleTypical height for the product
typicalDistanceUnitStringTypical distance unit from the following
  • cm
  • in
  • mm
quantityDiscountMethodStringThe list of values possible if not null
  • amount
  • fixed_price
  • percentage
quantityDiscountsArray of Object (Quantity Discount)quantity discounts array
barcodeStringBarcode value
brandStringBrand name
sellerStringSeller name
metaNameStringmetaname
metaDescriptionStringMeta description
vendorNotesStringVendor notes
countryOfOriginStringCountry of origin
varietyStringVariety
vintageStringVintage
formatStringFormat
vineyardStringVineyard
fantasyStringFantasy
consignmentStringConsignment
wineTypeStringWine Type
appellationStringAppellation
inventoryDoubleOn hand value.
manageInventoryStringEnable/disable inventory
specialStringproduct is marked as special

Response

JSON

JavaScript

1{
2	"productId": 12331,
3"price": 3.0,
4       	"productName": "Apples",
5        	"uom": "lb",
6       	"sku": "012",
7       	"packAvgNumberOfUnits": 4.0,
8       	"packPricePerUnit": 0.75,
9       	"packUnit": "each",
10       	"description": "organic",
11       	"productNote": "int product note",
12       	"enabled": true,
13       	"tags": [
14				{
15			"id": 123
16		},
17		...
18],
19       	"isPriceByWeight": false,
20       	"weightUnit": null,
21       	"typicalWeight": null,
22       	"typicalWeightUnit": null,
23       	"typicalLength": null,
24       	"typicalWidth": null,
25       	"typicalHeight": null,
26       	"typicalDistanceUnit": null,
27 		"quantityDiscountMethod": "fixed_price",
28       	"quantityDiscounts": [
29			{
30                    	"quantity": 20.0,
31                    	"fixedPrice": 2.0,
32                    	"amountDiscount": null,
33                    	"percentageDiscount": null
34               	 },
35			...
36],
37       	"barcode": "1",
38       	"brand": "apple brand",
39       	"seller": "apple seller",
40       	"metaName": "Apples",
41       	"metaDescription": "organic",
42       	"vendorNotes": "Vendor notes",
43       	"countryOfOrigin": "usa",
44       	"variety": "variety",
45       	"vintage": "vintage",
46       	"format": "format",
47       	"vineyard": "vineyard",
48       	"fantasy": "fantasy",
49       	"consignment": "consignment",
50       	"wineType": "wineType",
51       	"appellation": "appellation",
52"inventory": 33.0,
53    		"manageInventory": "Y",
54    		"special": "N",
55}

Update a Product

Retrieves the product for the provided product id.

Endpoint

PUT /api/products/{id}

Path Parameters

ParameterTypeDescription
idLongUnique order id

Request body

JSON

JavaScript

1{
2       	"price": 3.0,
3       	"productName": "Apples",
4        	"uom": "lb",
5       	"sku": "012",
6       	"packAvgNumberOfUnits": 4.0,
7       	"packPricePerUnit": 0.75,
8       	"packUnit": "each",
9       	"description": "organic",
10       	"productNote": "int prod note",
11       	"enabled": true,
12       	"tags": [
13				{
14			"id": 111
15		},
16		...
17],
18       	"isPriceByWeight": false,
19       	"weightUnit": null,
20       	"typicalWeight": null,
21       	"typicalWeightUnit": null,
22       	"typicalLength": null,
23       	"typicalWidth": null,
24       	"typicalHeight": null,
25       	"typicalDistanceUnit": null,
26 		"quantityDiscountMethod": "fixed_price",
27       	"quantityDiscounts": [
28			{
29                    	"quantity": 20.0,
30                    	"fixedPrice": 2.0,
31                    	"amountDiscount": null,
32                    	"percentageDiscount": null
33               	 },
34			...
35],
36       	"barcode": "1",
37       	"brand": "apple brand",
38       	"seller": "apple seller",
39       	"metaName": "Apples",
40       	"metaDescription": "organic",
41       	"vendorNotes": "Vendor notes",
42       	"countryOfOrigin": "usa",
43       	"variety": "variety",
44       	"vintage": "vintage",
45       	"format": "format",
46       	"vineyard": "vineyard",
47       	"fantasy": "fantasy",
48       	"consignment": "consignment",
49       	"wineType": "wineType"
50       	"appellation": "appellation",
51		"inventory": 33.0,
52    		"manageInventory": "Y",
53    		"special": "N",
54}
NameTypeDescription
price*DoublePrice should be rounded off to 4 decimal places at the most
productName*StringName for the product
uom*StringUnit of measure for the product
sku*StringSku for the product
packAvgNumberOfUnitsDoubleAverage number of units for the product should be rounded off to 2 decimal places at the most
packPricePerUnitDoublePack unit price should be rounded off to 4 decimal places at the most
packUnitStringPack-size unit of measure
descriptionStringDescription for the product
productNoteStringProduct note
enabledBooleanTrue or false for if product should be enabled or disabled
tagsArray of Object (Tag)Array of product tags
isPriceByWeightBooleanTrue or false if the product should be marked as priced by weight or not
weightUnitStringWeight units from the following
  • G
  • KG
  • OZ
  • LB
typicalWeightDoubleTypical weight for the product
typicalWeightUnitStringWeight units from the following
weight unit
  • G
  • OZ
  • LB
  • KG
Typical weight unit
  • G
  • OZ
  • OZ or LB
  • G or KG
typicalLengthDoubleTypical length for the product
typicalWidthDoubleTypical width for the product
typicalHeightDoubleTypical height for the product
typicalHeightDoubleTypical height for the product
typicalDistanceUnitStringTypical distance unit from the following
  • cm
  • in
  • mm
quantityDiscountMethodStringThe list of values possible if not null
  • amount
  • fixed_price
  • percentage
quantityDiscountsArray of Object (Quantity Discount)quantity discounts array
barcodeStringBarcode value
brandStringBrand name
sellerStringSeller name
metaNameStringmetaname
metaDescriptionStringMeta description
vendorNotesStringVendor notes
countryOfOriginStringCountry of origin
varietyStringVariety
vintageStringVintage
formatStringFormat
vineyardStringVineyard
fantasyStringFantasy
consignmentStringConsignment
wineTypeStringWine Type
appellationStringAppellation
inventoryDoubleOn hand value.
manageInventoryStringEnable/disable inventory
specialStringproduct is marked as special

Response

JSON

JavaScript

1{
2       	"price": 3.0,
3       	"productName": "Apples",
4        	"uom": "lb",
5       	"sku": "012",
6       	"packAvgNumberOfUnits": 4.0,
7       	"packPricePerUnit": 0.75,
8       	"packUnit": "each",
9       	"description": "organic",
10       	"productNote": "int prod note",
11       	"enabled": true,
12       	"tags": [
13				{
14			"name": "Fruit"
15		},
16		...
17],
18       	"isPriceByWeight": false,
19       	"weightUnit": null,
20       	"typicalWeight": null,
21       	"typicalWeightUnit": null,
22       	"typicalLength": null,
23       	"typicalWidth": null,
24       	"typicalHeight": null,
25       	"typicalDistanceUnit": null,
26 		"quantityDiscountMethod": "fixed_price",
27       	"quantityDiscounts": [
28			{
29                    	"quantity": 20.0,
30                    	"fixedPrice": 2.0,
31                    	"amountDiscount": null,
32                    	"percentageDiscount": null
33               	 },
34			...
35],
36       	"barcode": "1",
37       	"brand": "apple brand",
38       	"seller": "apple seller",
39       	"metaName": "Apples",
40       	"metaDescription": "organic",
41       	"vendorNotes": "Vendor notes",
42       	"countryOfOrigin": "usa",
43       	"variety": "variety",
44       	"vintage": "vintage",
45       	"format": "format",
46       	"vineyard": "vineyard",
47       	"fantasy": "fantasy",
48       	"consignment": "consignment",
49       	"wineType": "wineType",
50       	"appellation": "appellation",
51		"inventory": 33.0,
52    		"manageInventory": "Y",
53    		"special": "N",
54}

Delete a Product

Retrieves the product for the provided product id.

Endpoint

DEL /api/products/{id}

Path Parameters

ParameterTypeDescription
idLongUnique order id

Request body

JSON

JavaScript

1true

Catalogs

This is an object that represents a catalog.

1{
2   	"catalogId": 1111,
3"catalogName": "First Catalog",
4 	"clients": [
5        	{
6            		"clientId": 230851,
7            		"clientName": "Client1"
8        	},
9               ...
10    	],
11 "products": [
12        	{
13            	"productId": 224243,
14            	"finalPrice": 12.0,
15"percentageDiscount": 20.0,
16            	"baseProduct": {
17               	"productId": 224243,
18               	"productName": "Egg whites 12 quarts",
19               	"price": 15.0
20            		}
21	},
22{
23            "productId": 224247,
24            "finalPrice": 9.0,
25            "fixedPrice": 9.0,
26            "baseProduct": {
27                "productId": 224247,
28                "productName": "Cream 1 case (1 Lbs)",
29                "price": 9.0
30            }
31        },
32 {
33            	"productId": 224256,
34            	"finalPrice": 5.0,
35"amountDiscount": 20.0,
36            	"baseProduct": {
37              	"productId": 224256,
38                	"productName": "Thyme 4 oz",
39                	"price": 25.0
40            }
41       },
42        	...
43    	],
44 	"enabled": true
45}

Retrieve all Catalogs

Retrieves 50 catalogs at a time for the account.

Endpoint

GET /api/catalogs/

Query Parameters

ParameterTypeDescription
nextTokenStringUse nextToken returned by previous call to the list api to fetch the next set of products

Response

JSON

JavaScript

1{
2"catalogs": [
3{
4            "catalogId": 11111,
5            "catalogName": "First Catalog",
6            "enabled": false
7 },
8 {
9            "catalogId": 6926172,
10            "catalogName": "Second Catalog",
11            "enabled": true
12  },
13  {
14            "catalogId": 9379476,
15            "catalogName": "Third Catalog",
16            "enabled": false
17   },
18],
19"nextToken": "eyJhbGciOiJIUzI1NiJ9.eyJwYWdlIjoxLCJ0b3RhbENvdW50IjoyNzQsImlhdCI6MTY5NzgxMjYyNX0.xvvdVT3HmQMYAzXJUT9T5PJOKL6Qtk3icOE50LfVdjA"
20}

Objects

Catalog

FieldTypeDescription
catalogIdLongId of the catalog
catalogNameStringName of the catalog
enabledBooleanIf catalog is enabled then true, else false

Fields

FieldTypeDescription
catalogsArray of Object (Catalog)Array of catalogs
nextTokenStringUse this nextToken to fetch the next set of products

Retrieve a Catalog

Retrieves the catalog for the provided catalog id.

Endpoint

GET /api/catalogs/{id}

Path Parameters

ParameterTypeDescription
idLongUnique catalog id

Response

JSON

JavaScript

1{
2   	"catalogId": 1111,
3"catalogName": "First Catalog",
4 	"clients": [
5        	{
6            		"clientId": 230851,
7            		"clientName": "Client1"
8        	},
9               ...
10    	],
11 "products": [
12        	{
13            	"productId": 224243,
14            	"finalPrice": 12.0,
15"percentageDiscount": 20.0,
16            	"baseProduct": {
17               	"productId": 224243,
18               	"productName": "Egg whites 12 quarts",
19               	"price": 15.0
20            		}
21	},
22{
23            "productId": 224247,
24            "finalPrice": 9.0,
25            "fixedPrice": 9.0,
26            "baseProduct": {
27                "productId": 224247,
28                "productName": "Cream 1 case (1 Lbs)",
29                "price": 9.0
30            }
31        },
32{
33            	"productId": 224256,
34            	"finalPrice": 5.0,
35"amountDiscount": 20.0,
36            	"baseProduct": {
37              	"productId": 224256,
38                	"productName": "Thyme 4 oz",
39                	"price": 25.0
40            }
41       },
42        	...
43    	],
44 	"enabled": true
45}

Objects

Base Product

NameTypeDescription
productIdLongId for the product to be added to the catalog
productNameStringName of the product
priceDoubleUnit price of the product

Product

NameTypeDescription
productIdLongId for the product to be added to the catalog
finalPriceDoubleUnit catalog price of the product after applying discounts if provided
amountDiscountDoubleDiscount amount to be applied to the unit price of the product
percentageDiscountDoubleDiscount in percentage to be applied to the unit price of the product
fixedPriceDoubleFixed price to be applied to the product
baseProductObject (Base Product)Base product

Client

NameTypeDescription
clientIdLongId of the customer associated with this catalog
clientNameStringName of the customer associated with this catalog

Fields

NameTypeDescription
catalogIdLongId of the catalog
catalogNameStringName of the catalog
clientsArray of Object (Client)Array of clients
productsArray of Object (Product)Array of products

Create a Catalog

Creates the catalog with the provided payload.

Endpoint

POST /api/catalogs/

Request body

JSON

JavaScript

1{
2	"catalogName": "Catalog 1",
3	"products":
4	[
5{
6			"productId": 10881825,
7			"amountDiscount": null,
8			"percentageDiscount": null,
9			"fixedPrice": 50
10		},
11		...
12	],
13	"customers":
14	[
15		{
16			"id": 9785029
17		},
18		...
19	]
20}

Objects

Product

FieldTypeDescription
productIdLongId for the product to be added to the catalog
amountDiscountDoubleDiscount amount to be applied to the unit price of the product
percentageDiscountDoubleDiscount in percentage to be applied to the unit price of the product
fixedPriceDoubleFixed price to be applied to the product

Customer

FieldTypeDescription
idLongId of the customer to be associated with this catalog

Fields

NameTypeDescription
catalogNameStringName of the catalog
productsArray of Object (Product)Array of products to be added to the catalog
customersArray of Object (Customer)Array of customers to be associated with the catalog

Response

JSON

JavaScript

1{
2"catalogId": 111,
3"catalogName": "Catalog 1",
4"products":
5	[
6{
7			"productId": 10881825,
8			"amountDiscount": null,
9			"percentageDiscount": null,
10			"fixedPrice": 50
11		},
12		...
13	],
14	"customers":
15	[
16		{
17			"id": 9785029
18		},
19		...
20	]
21}

Update a Catalog

Retrieves the catalog for the provided catalog id.

Endpoint

PUT /api/catalogs/{id}

Path Parameters

ParameterTypeDescription
idLongUnique order id

Request body

JSON

JavaScript

1{
2	"catalogName": "Catalog 1",
3	"enabled": false,
4	"products":
5	[
6{
7			"productId": 10881825,
8			"amountDiscount": null,
9			"percentageDiscount": null,
10			"fixedPrice": 50
11		},
12		...
13	],
14	"customers":
15	[
16		{
17			"id": 9785029
18		},
19		...
20	]
21}

Fields

NameTypeDescription
catalogNameStringName of the catalog
productsArray of Object (Product)Array of products to be added to the catalog
customersArray of Object (Customer)Array of products to be added to the catalog

Response

JSON

JavaScript

1{
2	"catalogName": "Catalog 1",
3	"enabled": false,
4	"products":
5	[
6{
7			"productId": 10881825,
8			"amountDiscount": null,
9			"percentageDiscount": null,
10			"fixedPrice": 50
11		},
12		...
13	],
14	"customers":
15	[
16		{
17			"id": 9785029
18		},
19		...
20	]
21}

Delete a Catalog

Retrieves the catalog for the provided catalog id.

Endpoint

DEL /api/catalogs/{id}

Path Parameters

ParameterTypeDescription
idLongUnique order id

Request body

JSON

JavaScript

1true

Clients

This is an object that represents a client.

1{
2    
3	 "id": 10940282,
4        "name": "Client1",
5        "enabled": "Y",
6        "customerEmail": "client1@bluecart.com",
7        "customerFirstName": "Clientfirst",
8        "customerLastName": "Clientlast",
9        "status": "invited",
10        "catalog": {
11"id": 11111,
12"name": "First Catalog"
13  }
14        "lastOrderedDate": 1691021114820,
15        "orderFrequency": "Weekly",
16        "hasAccepted": false,
17        "clientAccountNumber": "null",
18        "clientNickname": "Client1 Nickname",
19        "deliveryProfile": "Tuesday Profile",
20        "notes": "Account notes",
21 "deliveryNotes": "delivery notes",
22        "deliveryType": "Delivery",
23 	 "netTerms": "net10",
24        "phoneNo": "",
25        "priceEnabled": "Y",
26        "clientAddress": {
27            "address1": null,
28            "address2": null,
29            "city": null,
30            "state": null,
31            "zip": null,
32            "countryCode": null,
33        },
34        "salesReps": [
35            {
36                "name": "sales rep",
37                "email": "salesrep@bluecart.com",
38                "id": 188487,
39                "phoneNumber": "1111111111"
40            },
41		...
42        ]    
43}

Retrieve all Clients

Retrieves 50 clients at a time associated with the account.

Endpoint

GET /api/catalogs/

Query Parameters

ParameterTypeDescription
nextTokenStringUse nextToken returned by previous call to the list api to fetch the next set of products

Response

JSON

JavaScript

1{
2	"clients": [
3    {
4	 "id": 10940282,
5        "name": "Client1",
6        "enabled": "Y",
7        "customerEmail": "client1@bluecart.com",
8        "customerFirstName": "Clientfirst",
9        "customerLastName": "Clientlast",
10        "status": "invited",
11        "catalog": {
12"id": 11111,
13"name": "First Catalog"
14  }
15        "lastOrderedDate": 1691021114820,
16        "orderFrequency": "Weekly",
17        "hasAccepted": false,
18        "clientAccountNumber": "null",
19        "clientNickname": "Client1 Nickname",
20        "deliveryProfile": "Tuesday Profile",
21        "notes": "Accnt notes",
22 "deliveryNotes": "delivery notes",
23        "deliveryType": "Delivery",
24 	 "netTerms": "net10",
25        "phoneNo": "",
26        "priceEnabled": "Y",
27        "clientAddress": {
28            "address1": null,
29            "address2": null,
30            "city": null,
31            "state": null,
32            "zip": null,
33            "countryCode": null,
34        },
35        "salesReps": [
36            {
37                "name": "Sales Rep",
38                "email": "salesrep@bluecart.com",
39                "id": 11111,
40                "phoneNumber": "1111111111"
41            },
42		...
43        ]
44    },
45...
46],
47"nextToken": "eyJhbGciOiJIUzI1NiJ9.eyJwYWdlIjoxLCJ0b3RhbENvdW50IjoyNzQsImlhdCI6MTY5NzgxMjYyNX0.xvvdVT3HmQMYAzXJUT9T5PJOKL6Qtk3icOE50LfVdjA"
48}

Objects

Client Address

NameTypeDescription
address1StringFirst line of the address
address2StringSecond line of the address
cityStringCity
stateStringState code
zipStringZip
countryCodeStringCountry code

Sales Rep

NameTypeDescription
idLongUser id for the sales rep assigned to the client
nameStringName of the sales rep assigned to the client
emailStringEmail of the sales rep assigned to the client
phoneNumberStringEmail of the sales rep assigned to the client

Catalog

NameTypeDescription
idLongId of the catalog
nameStringName of the catalog

Client

NameTypeDescription
idLongId of the catalog
nameStringName of the catalog
customerEmailStringEmail of the point of contact for sending the invite
customerFirstNameStringFirst name of the point of contact from the client
customerLastNameStringLast name of the point of contact from the client
statusStringStatus of the association with the client
catalogObject (Catalog)Catalog assigned to the client
lastOrderedDateLongTimestamp in ms for the last time the client ordered
orderFrequencyStringTypical order frequency of the client. Possible values are -
  • Daily
  • Weekly
  • Biweekly
  • Monthly
  • Quarterly
Note: Biweekly is used for order frequency of every 2 weeks
hasAcceptedBooleanIf the client has accepted the invite true, else false
clientAccountNumberStringExternal account number for the client account
clientNicknameStringNickname for the client account
deliveryProfileStringName of the delivery profile to be assigned to the client
notesStringNotes for the client
deliveryNotesStringDelivery notes for the client
deliveryTypeStringDelivery type for the client Possible values are -
  • Local
  • Delivery
  • UPS Ground
  • WillCall
  • Shipment
  • UPS 3-Day
netTermsStringNet terms for the client Possible values are -
  • default
  • dueOnReceipt
  • net10
  • net15
  • net21
  • net30
  • net45
  • net7
  • net90
phoneNoStringPhone number for the client account, maximum length is 12
priceEnabledBooleanIf pricing on the catalog should be enabled for the client then true, else false
clientAddressObject (Client Address)Address for the client account
salesRepsArray of Object (Sales Rep)Array of sales reps to be assigned to the client account

Fields

FieldTypeDescription
clientsArray of Object (Client)Array of clients
nextTokenStringUse this nextToken to fetch the next set of products

Retrieve a Client

Retrieves the client for the provided client id.

Endpoint

GET /api/clients/{id}

Path Parameters

ParameterTypeDescription
idLongUnique catalog id

Response

JSON

JavaScript

1{
2    
3	 "id": 10940282,
4        "name": "Client1",
5        "enabled": "Y",
6        "customerEmail": "client1@bluecart.com",
7        "customerFirstName": "Clientfirst",
8        "customerLastName": "Clientlast",
9        "status": "invited",
10        "catalog": {
11"id": 11111,
12"name": "First Catalog"
13  }
14        "lastOrderedDate": 1691021114820,
15        "orderFrequency": "Weekly",
16        "hasAccepted": false,
17        "clientAccountNumber": "null",
18        "clientNickname": "Client1 Nickname",
19        "deliveryProfile": "Tuesday Profile",
20        "notes": "Accnt notes",
21 "deliveryNotes": "delivery notes",
22        "deliveryType": "Delivery",
23 	 "netTerms": "net10",
24        "phoneNo": "",
25        "priceEnabled": "Y",
26        "clientAddress": {
27            "address1": null,
28            "address2": null,
29            "city": null,
30            "state": null,
31            "zip": null,
32            "countryCode": null,
33        },
34        "salesReps": [
35            {
36                "name": "sales rep",
37                "email": "salesrep@bluecart.com",
38                "id": 188487,
39                "phoneNumber": "1111111111"
40            },
41		...
42        ]    
43}

Fields

NameTypeDescription
clientObject (Client)Client object for the given id

Create a Client Association

Creates the client association with the provided payload.

Endpoint

POST /api/clients/

Request body

JSON

JavaScript

1{
2	 "clientEmail": "client1@bluecart.com",
3 "clientId": 10940282,
4        "name": "Client1",
5        "customerFirstName": "ClientFirst",
6        "customerLastName": "ClientLast",
7        "catalogId": 11111,
8        "orderFrequency": "Weekly",
9        "clientAccountNumber": "null",
10        "clientNickname": "Client1 Nickname",
11        "deliveryProfileId": 112,
12        "notes": "Accnt notes",
13 "deliveryNotes": "delivery notes",
14        "deliveryType": "Delivery",
15 	 "netTerms": "net10",
16        "phoneNo": "",
17        "priceEnabled": "Y",
18        "clientAddress": {
19            "address1": null,
20            "address2": null,
21            "city": null,
22            "state": null,
23            "zip": null,
24            "countryCode": null,
25        },
26        "salesReps": [
27            {
28                "id": 188487
29            },
30		...
31        ]   
32}

Objects

Client Address

FieldTypeDescription
address1StringFirst line of the address
address2StringSecond line of the address
cityStringCity
stateStringState code
zipStringZip
countryCodeStringCountry code

Sales Rep

FieldTypeDescription
idLongUser id for the sales rep to be assigned to the client

Fields

NameTypeDescription
clientEmailStringEmail of the point of contact for sending the invite
clientIdLongId of the client account for inviting an existing BlueCart account
nameStringIf a new client is to be invited to the BlueCart platform
customerFirstNameStringFirst name of the point of contact from the client
customerLastNameStringLast name of the point of contact from the client
catalogIdLongId of the catalog to be assigned to the client
orderFrequencyStringTypical order frequency of the client. Possible values are -
  • Daily
  • Weekly
  • Biweekly
  • Monthly
  • Quarterly
Note: Biweekly is used for order frequency of every 2 weeks
clientAccountNumberStringExternal account number for the client account
clientNicknameStringNickname for the client account
deliveryProfileIdStringId of the delivery profile to be assigned to the client
notesStringNotes for the client
deliveryNotesStringDelivery notes for the client
deliveryTypeStringDelivery type for the client Possible values are -
  • Local
  • Delivery
  • UPS Ground
  • WillCall
  • Shipment
  • UPS 3-Day
netTermsStringNet terms for the client Possible values are -
  • default
  • dueOnReceipt
  • net10
  • net15
  • net21
  • net30
  • net45
  • net7
  • net90
phoneNoStringPhone number for the client account, maximum length is 12
priceEnabledBooleanIf pricing on the catalog should be enabled for the client then true, else false
clientAddressObject (Client Address)Address for the client account
salesRepsArray of Object (Sales Rep)Array of sales reps to be assigned to the client account

Response

JSON

JavaScript

1{
2	 "clientEmail": "client1@bluecart.com",
3 "clientId": 10940282,
4        "name": "Client1",
5        "customerFirstName": "ClientFirst",
6        "customerLastName": "ClientLast",
7        "catalogId": 123,
8        "orderFrequency": "Weekly",
9        "clientAccountNumber": "null",
10        "clientNickname": "Client1 Nickname",
11        "deliveryProfileId": 112,
12        "notes": "Account notes",
13 "deliveryNotes": "delivery notes",
14        "deliveryType": "Delivery",
15 	 "netTerms": "net10",
16        "phoneNo": "",
17        "priceEnabled": "Y",
18        "clientAddress": {
19            "address1": null,
20            "address2": null,
21            "city": null,
22            "state": null,
23            "zip": null,
24            "countryCode": null,
25        },
26        "salesReps": [
27            {
28                "id": 188487,
29            },
30		...
31        ]    
32}

Update a Client

Retrieves the client for the provided client id.

Endpoint

PUT /api/clients/{id}

Path Parameters

ParameterTypeDescription
idLongUnique order id

Request body

JSON

JavaScript

1{
2 "customerFirstName": "Clientfirst",
3        "customerLastName": "Clientlast",
4        "catalogId": 11111,
5        "orderFrequency": "Weekly",
6        "clientAccountNumber": "null",
7        "clientNickname": "Agnee",
8        "deliveryProfileId": 112,
9        "notes": "Account notes",
10 "deliveryNotes": "delivery notes",
11        "deliveryType": "Delivery",
12 	 "netTerms": "net10",
13        "phoneNo": "",
14        "priceEnabled": true,
15	 "status": "Lead"
16        "clientAddress": {
17            "address1": null,
18            "address2": null,
19            "city": null,
20            "state": null,
21            "zip": null,
22            "countryCode": null
23        },
24"clientShippingAddress": {
25            "address1": null,
26            "address2": null,
27            "city": null,
28            "state": null,
29            "zip": null,
30            "countryCode": null
31        },
32        "salesReps": [
33            {
34                "id": 188487,
35            },
36		...
37        ]   
38}

Fields

NameTypeDescription
customerFirstNameStringFirst name of the point of contact from the client
customerLastNameStringLast name of the point of contact from the client
catalogIdLongId of the catalog to be assigned to the client
orderFrequencyStringTypical order frequency of the client. Possible values are -
  • Daily
  • Weekly
  • Biweekly
  • Monthly
  • Quarterly
Note: Biweekly is used for order frequency of every 2 weeks
clientAccountNumberStringExternal account number for the client account
clientNicknameStringNickname for the client account
deliveryProfileIdStringId of the delivery profile to be assigned to the client
notesStringNotes for the client
deliveryNotesStringDelivery notes for the client
deliveryTypeStringDelivery type for the client Possible values are -
  • Local
  • Delivery
  • UPS Ground
  • WillCall
  • Shipment
  • UPS 3-Day
netTermsStringNet terms for the client Possible values are -
  • default
  • dueOnReceipt
  • net10
  • net15
  • net21
  • net30
  • net45
  • net7
  • net90
phoneNoStringPhone number for the client account, maximum length is 12
priceEnabledBooleanIf pricing on the catalog should be enabled for the client then true, else false
statusStringStatus of the. Possible values are -
  • accepted
  • active
  • inactive
  • invited
  • lead
  • lost
clientAddressObject (Client Address)Address for the client account
clientShippingAddressObject (Client Address)Shipping address for the client account
salesRepsArray of Object (Sales Rep)Array of sales reps to be assigned to the client account

Response

JSON

JavaScript

1{
2 "customerFirstName": "Clientfirst",
3        "customerLastName": "Clientlast",
4        "catalogId": 11111,
5        "orderFrequency": "Weekly",
6        "clientAccountNumber": "null",
7        "clientNickname": "Client1 Nickname",
8        "deliveryProfileId": 112,
9        "notes": "Accnt notes",
10 "deliveryNotes": "delivery notes",
11        "deliveryType": "Delivery",
12 	 "netTerms": "net10",
13        "phoneNo": "",
14        "priceEnabled": true,
15	 "status": "Lead"
16        "clientAddress": {
17            "address1": null,
18            "address2": null,
19            "city": null,
20            "state": null,
21            "zip": null,
22            "countryCode": null
23        },
24"clientShippingAddress": {
25            "address1": null,
26            "address2": null,
27            "city": null,
28            "state": null,
29            "zip": null,
30            "countryCode": null
31        },
32        "salesReps": [
33            {
34                "id": 188487,
35            },
36		...
37        ]   
38}

Users

List Users

Retrieves 25 orders at a time for the vendor account.

Endpoint

GET /users/?nextToken=token

Query Parameters

ParameterTypeDescription
nextTokenStringUse nextToken returned by previous call to the list api to fetch the next set of products

Response

JSON

JavaScript

1{
2    "users": [
3        {
4            "id": 127913621,
5            "firstName": "first",
6            "lastName": "last",
7            "email": "first@bluecart.com",
8            "enabled": true,
9            "notify": true,
10            "role": "Sales Rep",
11            "phone": "543534534-345435534534",
12            "reportsTo": 32909626,
13            "notificationTypes": [
14                "New/Substitute",
15                "Missing/Not Delivered",
16                "Returned",
17                "Received(Full)",
18                "Received(Partial)",
19                "ORDER_CHECKIN"
20            ],
21            "creationDateTime": "2023-10-10T14:47:35",
22            "lastUpdateDateTime": "2023-10-10T14:47:35"
23        },
24        ...
25    ],
26    "nextToken": null
27}

Fields

FieldTypeDescription
usersList of Object (User)Result list of users
nextTokenStringUse this nextToken to fetch the next set of orders

Retrieve a User

Endpoint

GET /users/{id}

Path Parameters

ParameterTypeDescription
idLongUnique user ID

Response

JSON

JavaScript

1{
2    "id": 127913621,
3    "firstName": "first",
4    "lastName": "last",
5    "email": "first@bluecart.com",
6    "enabled": true,
7    "notify": true,
8    "role": "Sales Rep",
9    "phone": "543534534-345435534534",
10    "reportsTo": 32909626,
11    "notificationTypes": [
12        "New/Substitute",
13        "Missing/Not Delivered",
14        "Returned",
15        "Received(Full)",
16        "Received(Partial)",
17        "ORDER_CHECKIN"
18    ],
19    "creationDateTime": "2023-10-10T14:47:35",
20    "lastUpdateDateTime": "2023-10-10T14:47:35"
21}

Objects

User

NameTypeDescription
idLongUnique ID of the user
firstNameStringFirst name of the user
lastNameStringLast name of the user
emailStringEmail of the user
enabledBooleanIndicates if the user is enabled
notifyBooleanIndicates if the user will be notified of order status changes
roleType
  • Sales Rep
  • Manager
Role of the user
phoneStringPhone number of the user
reportsToLongID of the user whom this user will report to
notificationTypesList of Type
  • ORDER_CHECKIN
  • New/Substitute
  • Missing/Not Delivered
  • Returned
  • Received(Full)
  • Received(Partial)
List of available notification types the user will be notified of
creationDateDateTime (YYYY-mm-dd’T’hh:mm:ss)Creation date time of the order
lastUpdateDateDateTime (YYYY-mm-dd’T’hh:mm:ss)Last update date time of the order

Create a User

Endpoint

POST /users/

Request body

JSON

JavaScript

1{
2    "firstName": "first",
3    "lastName": "last",
4    "email": "first@bluecart.com",
5    "enabled": true,
6    "notify": true,
7    "role": "Sales Rep",
8    "phone": "543534534-345435-534534",
9    "reportsTo": 10751238,
10    "notificationTypes": [
11        "New/Substitute",
12        "Missing/Not Delivered",
13        "Returned",
14        "Received(Full)",
15        "Received(Partial)"
16    ]
17}

Objects

User

NameTypeDescription
firstNameStringFirst name of the user
lastNameStringLast name of the user
emailStringEmail of the user
enabledBooleanIndicates if the user is enabled
notifyBooleanIndicates if the user will be notified of order status changes
roleType
  • Sales Rep
  • Manager
Role of the user
phoneStringPhone number of the user
reportsToLongID of the user whom this user will report to
notificationTypesList of Type
  • ORDER_CHECKIN
  • New/Substitute
  • Missing/Not Delivered
  • Returned
  • Received(Full)
  • Received(Partial)
List of available notification types the user will be notified of

Response

JSON

JavaScript

1{
2    "id": 10798282,
3    "firstName": "first",
4    "lastName": "last",
5    "email": "first@bluecart.com",
6    "enabled": true,
7    "notify": true,
8    "role": "Sales Rep",
9    "phone": "543534534-345435-534534",
10    "reportsTo": 10751238,
11    "notificationTypes": [
12        "New/Substitute",
13        "Missing/Not Delivered",
14        "Returned",
15        "Received(Full)",
16        "Received(Partial)"
17    ],
18    "creationDateTime": "2023-10-21T23:46:14",
19    "lastUpdateDateTime": "2023-10-21T23:46:14"
20}

Objects

User

NameTypeDescription
idLongUnique ID of the user
firstNameStringFirst name of the user
lastNameStringLast name of the user
emailStringEmail of the user
enabledBooleanIndicates if the user is enabled
notifyBooleanIndicates if the user will be notified of order status changes
roleType
  • Sales Rep
  • Manager
Role of the user
phoneStringPhone number of the user
reportsToLongID of the user whom this user will report to
notificationTypesList of Type
  • ORDER_CHECKIN
  • New/Substitute
  • Missing/Not Delivered
  • Returned
  • Received(Full)
  • Received(Partial)
List of available notification types the user will be notified of
creationDateDateTime (YYYY-mm-dd’T’hh:mm:ss)Creation date time of the order
lastUpdateDateDateTime (YYYY-mm-dd’T’hh:mm:ss)Last update date time of the order

Update a User

Endpoint

PUT /users/{id}

Path Parameters

ParameterTypeDescription
idLongUnique order id

Request body

JSON

JavaScript

1{
2    "firstName": "first",
3    "lastName": "last",
4    "email": "first@bluecart.com",
5    "enabled": true,
6    "notify": true,
7    "role": "Sales Rep",
8    "phone": "543534534-345435-534534",
9    "reportsTo": 10751238,
10    "notificationTypes": [
11        "Returned",
12        "Received(Full)",
13        "Received(Partial)"
14    ]
15}

Objects

User

NameTypeDescription
firstNameStringUpdated first name of the user
lastNameStringUpdated last name of the user
emailStringUpdated email of the user
enabledBooleanIndicates if the user is enabled
notifyBooleanIndicates if the user will be notified of order status changes
roleType
  • Sales Rep
  • Manager
Role of the user
phoneStringPhone number of the user
reportsToLongID of the user whom this user will report to
notificationTypesList of Type
  • ORDER_CHECKIN
  • New/Substitute
  • Missing/Not Delivered
  • Returned
  • Received(Full)
  • Received(Partial)
List of available notification types the user will be notified of

Response

JSON

JavaScript

1{
2    "id": 10798282,
3    "firstName": "first",
4    "lastName": "last",
5    "email": "first@bluecart.com",
6    "enabled": true,
7    "notify": true,
8    "role": "Sales Rep",
9    "phone": "543534534-345435-534534",
10    "reportsTo": 10751238,
11    "notificationTypes": [
12        "Returned",
13        "Received(Full)",
14        "Received(Partial)"
15    ],
16    "creationDateTime": "2023-10-21T23:46:14",
17    "lastUpdateDateTime": "2023-10-21T23:58:49"
18}

Objects

User

NameTypeDescription
firstNameStringUpdated first name of the user
lastNameStringUpdated last name of the user
emailStringUpdated email of the user
enabledBooleanIndicates if the user is enabled
notifyBooleanIndicates if the user will be notified of order status changes
roleType
  • Sales Rep
  • Manager
Role of the user
phoneStringPhone number of the user
reportsToLongID of the user whom this user will report to
notificationTypesList of Type
  • ORDER_CHECKIN
  • New/Substitute
  • Missing/Not Delivered
  • Returned
  • Received(Full)
  • Received(Partial)
List of available notification types the user will be notified of
creationDateDateTime (YYYY-mm-dd’T’hh:mm:ss)Creation date time of the order
lastUpdateDateDateTime (YYYY-mm-dd’T’hh:mm:ss)Last update date time of the order

Disable a User

Endpoint

DELETE /users/{id}

Path Parameters

ParameterTypeDescription
idLongUnique order id

Request body

JSON

JavaScript

1true