Introduction
This is the official documentation of RedMart's Marketplace Partner API. Using this private API, you'll be able to manage your inventory, products, orders, pickups and more!
We provide language bindings in Shell. You can view code samples in the dark pane on the right.
Changelog
We will list any changes to the current version of the API here.
Date | Details of changes |
---|---|
2023-08-10 | Adds Pickup Jobs API |
Adds new scope for pickup jobs query | |
Adds new rate limits for pickup jobs query | |
2018-07-06 | Pre-release of RedMart Partner API Document Version 1 |
2018-07-13 | Renames Stocks as Stock Lots |
Identifies each Stock Lot by their new id field (rather than the previously used availableForPickupFrom ) |
|
Adds the error response code 409 Conflict in Update one Stock Lot | |
2018-08-02 | Adds OAuth 2 scopes to all endpoints to manage access rights of applications |
Lists all available Environments | |
2018-08-28 | Adds Rate Limiting section |
Environments
We currently provide the Partner API in one environment, Production.
Environment | Hostname |
---|---|
Production | partners-api.redmart.com |
Registration
The Partner API uses the OAuth2 authorization framework and supports the Client Credentials flow.
In a nutshell :
- Contact RedMart Partner Support at rm_partnersupport@care.lazada.com to register your Client Application
- Save (securely) your CLIENT_ID and CLIENT_SECRET into your Client Application's database
- Client Application requests an Access Token from Partner API using its CLIENT_ID and CLIENT SECRET
- Client Application uses the Access Token to call Partner API endpoints
- Once Client Application starts receiving 401 Unauthorized responses to its calls, it means the Access Token has expired. It then needs to request another Access Token (step 3)
Request a Token
To request a token, use this code:
curl --include -X POST \
"https://{HOSTNAME}/oauth2/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
--data "grant_type=client_credentials" \
--data "client_id={MY_CLIENT_ID}" \
--data "client_secret={MY_CLIENT_SECRET}" \
--data "scope={scopes}"
// TODO
Make sure to replace
{MY_CLIENT_ID}
and{MY_CLIENT_SECRET}
with the actual values provided during Registration and{scopes}
with a space-separated list of scopes.
The Client Application makes a request to the /oauth2/token
endpoint by sending the following parameters in the "application/x-www-form-urlencoded" format
Parameter | Required | Description |
---|---|---|
client_id | true | The Client ID provided during Registration |
client_secret | true | The Client Secret provided during Registration |
grant_type | true | The value MUST be set to "client_credentials" |
scope | true | A space-separated list of scopes, e.g. read:product read:pickup-location |
200 OK response:
{
"token_type": "bearer",
"access_token": "{access-token}",
"expires_in": 7200 // this is in seconds
}
Scopes
To call any endpoint of this API, your access token needs to have access to the scope that this specific endpoint requires. As a best practice, you should always only request the smallest possible set of scopes for your application to work. This ensures the smallest possible impact in case anything goes wrong (see also Principle of least privilege).
Scope | Scope Description |
---|---|
read:pickup-location | Grants access to view details of a pickup location |
read:product | Grants access to view details of a product |
read:stock-lot | Grants access to view stock lots of a product |
write:stock-lot | Grants access to update stock lots of a product |
read:pickup-job | Grants access to view pickup jobs of a store |
Rate Limiting
Each endpoint of this API limits how many times you can call it per second. Below is a summary of all existing endpoints and their respective rate limit.
Endpoint | Max number of calls per second |
---|---|
Get all Pickup Locations | 10 |
Get one Pickup Location | 10 |
Get all Products | 10 |
Get one Product | 10 |
Get all Stock Lots | 10 |
Get one Stock Lot | 10 |
Update one Stock Lot | 10 |
Get Pickup Jobs | 1 |
Get one Pickup Job | 10 |
Each (successful) response from the above endpoints contains 2 headers you can monitor to help control your rate
http Header | Example Value | Description |
---|---|---|
X-RateLimit-Limit-second | 10 | max number of calls per second allowed for this particular endpoint. Always the same value. |
X-RateLimit-Remaining-second | 9 | max remaining number of calls allowed in the current second for this particular endpoint. |
If you exceed the rate limit of a particular endpoint, it'll keep responding http code 429 until the current second is passed.
Pickup Locations
A Product can be picked from within one Pickup Location. A Marketplace Seller can have several Pickup Locations.
Get all Pickup Locations
Code samples
curl --include -X GET \
"https://{HOSTNAME}/v1/pickup-locations?page=1&pageSize=50" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
// TODO
GET /v1/pickup-locations
Querying and filtering pickup locations
Query Parameters
Parameter | In | Required | Default | Description |
---|---|---|---|---|
page | query | false | 1 | The page number, must be >= 1 |
pageSize | query | false | 50 | Number of items on one page, must be >= 1 and <= 100 |
200 Response
{
"page": 1,
"pageSize": 50,
"items": [
{
"addressLine1": "1 Main Street",
"city": "Singapore",
"name": "ABC Merchant",
"country": "Singapore",
"postalCode": "123456",
"id": "23789",
"addressLine2": "#02-15"
}
],
"total": 1
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Page*PickupLocation* |
Get one Pickup Location
Code samples
curl --include -X GET \
"https://{HOSTNAME}/v1/pickup-locations/{pickupLocationId}" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
// TODO
GET /v1/pickup-locations/{pickupLocationId}
Querying the details of a specific pickup location
Path Parameters
Parameter | In | Required | Description |
---|---|---|---|
pickupLocationId | path | true | The unique Identifier of the pickup-location, in the response example it's the value 23789 |
200 Response
{
"addressLine1": "1 Main Street",
"city": "Singapore",
"name": "ABC Merchant",
"country": "Singapore",
"postalCode": "123456",
"id": "23789",
"addressLine2": "#02-15"
}
404 Response
{
"title": "The requested resource could not be found"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | PickupLocation |
404 | Not Found | Not Found | Problem |
Products
The Products API allows you to retrieve Products and update their inventory stocks.
Get all Products
Code samples
curl --include -X GET \
"https://{HOSTNAME}/v1/products?page=1&pageSize=50&pickupLocationIds=23789,23790" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
// TODO
GET /v1/products
Query and filter products
Query Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
page | query | integer | false | Page to start returning results from, must be >= 1 |
pageSize | query | integer | false | Number of items on one page, must be >= 1 and <= 100 |
pickupLocations | query | array[string] | false | The unique ids of pickup locations you want to retrieve the products from (comma-separated) |
200 Response
{
"page": 1,
"pageSize": 50,
"items": [
{
"barcodes": ["111122223333"],
"status": {
"type": "Enabled"
},
"title": "Chocolate Cereals",
"rpc": 100150,
"pickupLocations": [
{
"id": "23789"
}
],
"productCode": "abc-merch-specific-choc-cereals-code"
},
{
"barcodes": ["444455556666"],
"status": {
"type": "Disabled"
},
"title": "Apple Cereals",
"rpc": 100151,
"pickupLocations": [
{
"id": "23789"
}
],
"productCode": "abc-merch-specific-choc-cereals-code"
},
{
"barcodes": ["444455556666"],
"status": {
"type": "Discontinued"
},
"title": "Fresh Orange Juice",
"rpc": 120350,
"pickupLocations": [
{
"id": "23790"
}
],
"productCode": "abc-merch-specific-orange-juice-code"
}
],
"total": 3
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Page*Product* |
Get one Product
Get one Product by RPC (RPC stands for 'RedMart Product Code')
Code samples
curl --include -X GET \
"https://{HOSTNAME}/v1/products/{productId}" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
// TODO
GET /v1/products/{productId}
Querying the details of a specific product by RPC
Path Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
productId | path | string | true | the RPC of the Product (so the RedMart-specific code, not the merchant-specific code) |
200 Response
{
"barcodes": ["111122223333"],
"status": {
"type": "Enabled"
},
"title": "Chocolate Cereals",
"rpc": 100150,
"pickupLocations": [
{
"id": "23789"
}
],
"productCode": "abc-merch-specific-choc-cereals-code"
}
404 Response
{
"title": "The requested resource could not be found"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Product |
400 | Bad Request | Bad Request | Problem |
404 | Not Found | Not Found | Problem |
Get all Stock Lots
With this endpoint, retrieve all Stock Lots of a given product. For now, RedMart supports only one Stock Lot per product.
Code samples
curl --include -X GET \
"https://{HOSTNAME}/v1/products/{productId}/pickup-locations/{pickupLocationId}/stock-lots" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
// TODO
GET /v1/products/{productId}/pickup-locations/{pickupLocationId}/stock-lots
Querying all in-store stock lots levels for a specific product in a specific pickup location
Path Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
productId | path | string | true | the RPC of the Product (so the RedMart-specific code, not the merchant-specific code) |
pickupLocationId | path | string | true | The unique id of the pickup location where the product is stored |
200 Response
[
{
"id": "0",
"quantityAtPickupLocation": 10,
"quantityScheduledForPickup": 2,
"quantityAvailableForSale": 8
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
400 | Bad Request | Bad Request | Problem |
404 | Not Found | Not Found | Problem |
200 Response Schema
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
[StockLot] | false | none | none | |
id | string | true | none | Identifier of the requested Stock Lot. For now always hardcoded to "0" (please note the String type, do not always expect it to be a number !) |
quantityAtPickupLocation | integer(int32) | true | none | Number of items available in the pickup location |
quantityScheduledForPickup | integer(int32) | true | none | Number of items that are scheduled for pickup in the next few days |
quantityAvailableForSale | integer(int32) | true | none | Number of items that can currently still be ordered by customers |
Get one Stock Lot
For now, RedMart supports only one Stock Lot per Product.
Code samples
curl --include -X GET \
"https://{HOSTNAME}/v1/products/{productId}/pickup-locations/{pickupLocationId}/stock-lots/0" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
// TODO
GET /v1/products/{productId}/pickup-locations/{pickupLocationId}/stock-lots/0
Querying in-store stock levels for a product in a specific pickup location
Path Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
productId | path | string | true | the RPC of the Product (so the RedMart-specific code, not the merchant-specific code) |
pickupLocationId | path | string | true | The unique id of the pickup location where the product is stored |
id | path | string | true | Identifier of the requested Stock Lot. For now always hardcoded to "0" (please note the String type, do not always expect it to be a number !) |
200 Response
{
"id": "0",
"quantityAtPickupLocation": 10,
"quantityScheduledForPickup": 2,
"quantityAvailableForSale": 8
}
404 Response
{
"title": "The requested resource could not be found"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | StockLot |
400 | Bad Request | Bad Request | Problem |
404 | Not Found | Not Found | Problem |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | Identifier that describes the latest state of this resource |
Update one Stock Lot
Code samples
curl --include -X PATCH \
"https://{HOSTNAME}/v1/products/{productId}/pickup-locations/{pickupLocationId}/stock-lots/0" \
-H 'Content-Type: application/merge-patch+json' \
-H 'Accept: application/json' \
-H 'If-Match: "10"' \
-H 'Authorization: Bearer {access-token}' \
--data '{"quantityAtPickupLocation": 20}'
// TODO
PATCH /v1/products/{productId}/pickup-locations/{pickupLocationId}/stock-lots/0
Updating a specific in-store stock lot's level for an RPC in a specific pickup location
Body parameter
{
"quantityAtPickupLocation": 20
}
Path and Header Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
productId | path | string | true | the RPC of the Product (so the RedMart-specific code, not the merchant-specific code) |
pickupLocationId | path | string | true | The unique id of the pickup location where the product is stored |
id | path | string | true | Identifier of the requested Stock Lot. For now always hardcoded to "0" (please note the String type, do not always expect it to be a number !) |
If-Match | header | string | true | The update request will only be processed if this value matches the latest ETag value of the resource (see Response Headers section of the Get one Stock Lot endpoint) |
body | body | StockLotUpdate | true | StockLotUpdate |
200 Response
{
"id": "0",
"quantityAtPickupLocation": 20,
"quantityScheduledForPickup": 2,
"quantityAvailableForSale": 18
}
409 Response
{
"title": "the request conflicted with the current state of the resource"
}
412 Response
{
"title": "the If-Match condition evaluated to false"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | StockLot |
400 | Bad Request | Bad Request | Problem |
404 | Not Found | Not Found | Problem |
409 | Conflict | The quantityAtPickupLocation value in your request is strictly lower than the quantityScheduledForPickup value. Set quantityAtPickupLocation to be at least equal to quantityScheduledForPickup before resubmitting. |
Problem |
412 | Precondition Failed | The Stock Lot level has changed since the last time you read it, which may result in an inconsistent state. Re-read the Stock Lot, fetch its Etag and update your If-Match header before resubmitting. |
Problem |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | Identifier that describes the latest state of this resource |
Pickup Jobs
The Pickup Jobs API allows you to retrieve scheduled or completed pickup jobs.
Get Pickup Jobs
Code samples
curl --include -X GET \
"https://{HOSTNAME}/v1/pickup-jobs?from=1682870400000&till=1685548800000&statuses=pending" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
// TODO
GET /v1/pickup-jobs
Query and filter pickup jobs. Maximum allowable date range query is 31 days. Unable to retrieve data older than 180 days.
Query Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
from | query | integer | true | Epoch milliseconds of start of date range query |
till | query | integer | false | Epoch milliseconds of end of date range query |
statuses | query | array[string] | false | Comma-separated job statuses that you want to include. Refer to JobStatus for valid statuses |
200 Response
[
{
"scheduledAt": 1684135189000,
"qtyFulfilledCount": 12 // sum of qtyFulfilled of Salmon (10) and qtyFulfilled of Curry (2),
"amendabilityCutOffDate": 1684135989000,
"preferredPickupTime": "13:00-17:00",
"items": [
{
"name": "Salmon",
"qtyFulfilled": 10,
"sku": "19739731408",
"size": "2.5 kg",
"shipmentsInfo": [
{
"qty": 5,
"orderId": "49e74qjnkprp1to4"
},
{
"qty": 6,
"orderId": "49e74qjn1prp1to4"
}
],
"minimumExpiryDate": 1770357600000,
"qty": 11,
"vpc": "19739731408",
"imageUrl": "http://media.redmart.com/newmedia/1600x/i/m/xxx.jpg",
"rpc": 123456
},
{
"name": "Curry",
"qtyFulfilled": 2,
"sku": "19739731408",
"size": "2.5 kg",
"shipmentsInfo": [
{
"qty": 2,
"orderId": "49e74qjnkprp1to4"
},
],
"minimumExpiryDate": 1770357600000,
"qty": 2,
"vpc": "19739731408",
"imageUrl": "http://media.redmart.com/newmedia/1600x/i/m/xxx.jpg",
"rpc": 123456
}
],
"pickedAt": 1684136189000,
"id": 123,
"status": "pickedup",
"category": "Dry",
"qtyCount": 13 // sum of qty of Salmon (11) and qty of Curry (2)
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | List of PickupJob |
400 | Bad Request | Bad Request | Problem |
Get Pickup Job
Code samples
curl --include -X GET \
"https://{HOSTNAME}/v1/pickup-jobs/{pickupJobId}" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
// TODO
GET /v1/pickup-jobs/{pickupJobId}
Querying one pickup job by pickupJobId
Path Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
pickupJobId | path | string | true | Unique identifier of pickup job |
200 Response
{
"scheduledAt": 1684135189000,
"qtyFulfilledCount": 10,
"amendabilityCutOffDate": 1684135989000,
"preferredPickupTime": "13:00-17:00",
"items": [
{
"name": "Salmon",
"qtyFulfilled": 10,
"sku": "19739731408",
"size": "2.5 kg",
"shipmentsInfo": [
{
"qty": 5,
"orderId": "49e74qjnkprp1to4"
},
{
"qty": 6,
"orderId": "49e74qjn1prp1to4"
}
],
"minimumExpiryDate": 1770357600000,
"qty": 11,
"vpc": "19739731408",
"imageUrl": "http://media.redmart.com/newmedia/1600x/i/m/xxx.jpg",
"rpc": 123456
}
],
"pickedAt": 1684136189000,
"id": 123,
"status": "pickedup",
"category": "Dry",
"qtyCount": 11
}
404 Response
{
"title": "Could not find store or pickup job"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | PickupJob |
404 | Not Found | Pickup job associated with store not Found | Problem |
Schemas
All schemas referenced in the APIs documented above
PickupLocation
{
"addressLine1": "string",
"city": "string",
"name": "string",
"country": "string",
"postalCode": "string",
"id": "string",
"addressLine2": "string"
}
PickupLocation
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
addressLine1 | string | true | none | none |
city | string | true | none | none |
name | string | true | none | none |
country | string | true | none | none |
postalCode | string | true | none | none |
id | string | true | none | none |
addressLine2 | string | true | none | none |
StockLotUpdate
{
"quantityAtPickupLocation": 0
}
StockLotUpdate
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
quantityAtPickupLocation | integer(int32) | true | none | Number of items available in the pickup location |
Problem
{
"title": "string"
}
Problem
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
title | string | true | none | none |
PickupLocationId
{
"id": "string"
}
PickupLocationId
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | true | none | none |
Product
{
"barcodes": ["string"],
"status": {
"type": "Enabled"
},
"title": "string",
"rpc": 0,
"pickupLocations": [
{
"id": "string"
}
],
"productCode": "string"
}
Product
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
barcodes | [string] | true | none | none |
status | Status | true | none | none |
title | string | true | none | none |
rpc | integer(int64) | true | none | The RPC (RedMart Product Code) of an item |
pickupLocations | [PickupLocationId] | true | none | none |
productCode | string | true | none | Custom product code as defined by the seller |
Status
{
"type": "Disabled"
}
Status
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
type | string | true | none | none |
Enumerated Values
Property | Value |
---|---|
type | Disabled |
type | Discontinued |
type | Enabled |
Stock Lot
{
"id": "0",
"quantityAtPickupLocation": 0,
"quantityScheduledForPickup": 0,
"quantityAvailableForSale": 0
}
StockLot
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | true | none | Identifier of the Stock Lot. For now always hardcoded to "0" |
quantityAtPickupLocation | integer(int32) | true | none | Number of items available in the pickup location |
quantityScheduledForPickup | integer(int32) | true | none | Number of items that are scheduled for pickup in the next few days |
quantityAvailableForSale | integer(int32) | true | none | Number of items that can currently still be ordered by customers |
Page_PickupLocation_
{
"page": 0,
"pageSize": 0,
"items": [
{
"addressLine1": "string",
"city": "string",
"name": "string",
"country": "string",
"postalCode": "string",
"id": "string",
"addressLine2": "string"
}
],
"total": 0
}
Page«PickupLocation»
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
page | integer(int32) | true | none | none |
pageSize | integer(int32) | true | none | none |
items | [PickupLocation] | true | none | none |
total | integer(int32) | false | none | none |
Page_Product_
{
"page": 0,
"pageSize": 0,
"items": [
{
"barcodes": ["string"],
"status": {
"type": "Enabled"
},
"title": "string",
"rpc": 0,
"pickupLocations": [
{
"addressLine1": "string",
"city": "string",
"name": "string",
"country": "string",
"postalCode": "string",
"id": "string",
"addressLine2": "string"
}
],
"productCode": "string"
}
],
"total": 0
}
Page«Product»
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
page | integer(int32) | true | none | none |
pageSize | integer(int32) | true | none | none |
items | [Product] | true | none | none |
total | integer(int32) | false | none | none |
PickupJob
{
"scheduledAt": 1684135189000,
"qtyFulfilledCount": 12 // sum of qtyFulfilled of Salmon (10) and qtyFulfilled of Curry (2),
"amendabilityCutOffDate": 1684135989000,
"preferredPickupTime": "13:00-17:00",
"items": [
{
"name": "Salmon",
"qtyFulfilled": 10,
"sku": "19739731408",
"size": "2.5 kg",
"shipmentsInfo": [
{
"qty": 5,
"orderId": "49e74qjnkprp1to4"
},
{
"qty": 6,
"orderId": "49e74qjn1prp1to4"
}
],
"minimumExpiryDate": 1770357600000,
"qty": 11,
"vpc": "19739731408",
"imageUrl": "http://media.redmart.com/newmedia/1600x/i/m/xxx.jpg",
"rpc": 123456
},
{
"name": "Curry",
"qtyFulfilled": 2,
"sku": "19739731408",
"size": "2.5 kg",
"shipmentsInfo": [
{
"qty": 2,
"orderId": "49e74qjnkprp1to4"
},
],
"minimumExpiryDate": 1770357600000,
"qty": 2,
"vpc": "19739731408",
"imageUrl": "http://media.redmart.com/newmedia/1600x/i/m/xxx.jpg",
"rpc": 123456
}
],
"pickedAt": 1684136189000,
"id": 123,
"status": "pickedup",
"category": "Dry",
"qtyCount": 13 // sum of qty of Salmon (11) and qty of Curry (2)
}
PickupJob
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
scheduledAt | integer(int64) | true | none | Epoch milliseconds of scheduled pick up time |
qtyFulfilledCount | integer(int32) | true | none | Sum of quantity of all picked up items in the actual job |
amendabilityCutOffDate | integer(int64) | false | none | Epoch milliseconds after which pickup job cannot be amended (if available) |
preferredPickupTime | string | false | none | Preferred pickup time/range specified by seller (if applicable) |
items | [PickupItem] | true | none | List of items being picked up |
pickedAt | integer(int64) | false | none | Epoch milliseconds of actual pickup time |
id | integer(int64) | true | none | Pickup job id |
status | string | true | none | Pickup job status. Refer to JobStatus for more details |
category | string | true | none | Category of products being picked up, e.g. dry, fresh, frozen, etc |
qtyCount | integer(int32) | true | none | Sum of quantity of all items in the scheduled job |
PickupItem
{
"name": "Salmon",
"qtyFulfilled": 10,
"sku": "19739731408",
"size": "2.5 kg",
"shipmentsInfo": [
{
"qty": 5,
"orderId": "49e74qjnkprp1to4"
},
{
"qty": 6,
"orderId": "49e74qjn1prp1to4"
}
],
"minimumExpiryDate": 1770357600000,
"qty": 11,
"vpc": "19739731408",
"imageUrl": "http://media.redmart.com/newmedia/1600x/i/m/xxx.jpg",
"rpc": 123456
}
PickupItem
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | true | none | Name of item |
qtyFulfilled | integer(int32) | false | none | Quantity of the item being picked up in actual job |
sku | string | true | none | Stock Keeping Unit (SKU) code for the item |
size | string | false | none | The size or dimensions of the item (if available) |
shipmentsInfo | [ShipmentInfo] | false | none | List of orders for the pickup of this item |
minimumExpiryDate | integer(int64) | false | none | Minimum expiry date of item in epoch milliseconds |
qty | integer(int32) | true | none | Quantity of the item to be picked up in scheduled job |
vpc | string | false | none | Variant product code of a parent SKU |
imageUrl | string | false | none | The URL of the image associated with the item (if available) |
rpc | integer(int64) | true | none | The RPC (RedMart Product Code) of an item |
ShipmentInfo
{
"qty": 6,
"orderId": "49e74qjn1prp1to4"
}
ShipmentInfo
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
qty | integer(int32) | true | none | Quantity of item |
orderId | string | true | none | Unique identifier of the order |
JobStatus
"pickedup"
JobStatus
Possible Job Status
Query using values in string column.
Status | String | Description |
---|---|---|
Pending | "pending" | Job pending |
PickupArrived | "arrived" | Driver arrived |
PickedUp | "pickedup" | Items picked up |
Cancelled | "cancelled" | Job cancelled |
PickupFailed | "failed" | Pickup failed |
Errors
The Partner API uses the following error codes:
Error Code | Meaning |
---|---|
400 | Bad Request -- Your request is semantically invalid, e.g. it contains a number where a string is expected or it's missing a mandatory parameter. |
401 | Unauthorized -- Your oauth2 access-token is absent, invalid or expired. |
403 | Forbidden -- Your oauth2 access-token is valid but its scope does not grant you access to this operation. |
404 | Not Found -- The specified resource could not be found. |
409 | Conflict -- Your request conflicts with the current state of the resource, e.g. you're setting a product stock's quantityAtPickupLocation to a value lower than its current quantityScheduledForPickup resulting in its quantityAvailableForSale being negative. |
412 | Unprocessable Entity -- Your request is semantically valid but it cannot be processed, e.g. because its date parameter 'from' is greater than its 'till'. |
422 | Precondition Failed -- One or more conditions given in the request header fields evaluated to false when tested on the server, e.g. the if-match header of your update-stock-lot request did not match the current stock on RedMart side. |
429 | Too Many Requests -- You're triggering our rate limiter! Slow down! |
500 | Internal Server Error -- We had a problem with our server. Try again later. |
503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. |