What You Need To Know
- Base URL: https://api.retailops.com
- The remainder of the URL is based on "Action" Name and Version Number.
- Product.Sku.search v1 - https://api.retailops.com/product/sku/search~1.json
- Inventory.Lot.update v1 - https://api.retailops.com/inventory/lot/update~1.json
- Product.ExternalSku.update v2 - https://api.retailops.com/product/externalsku/update~2.json
- Use HTTPS POST, with the following headers:
- Content-Type: application/json
- apikey: YOUR_API_KEY_GOES_HERE
- Request body must be valid JSON (see json.org for more info).
- API Documentation - http://developer.gudtech.com/
URL Formatting
URLs for actions should follow the format shown in the example below:
https://api.retailops.com/product/sku/search~1.json
In this example:
- Action: Product.Sku.search Version 1
- Periods (.) in the action should be replaced with forward slashes (/) in the URL.
- The version is expressed with a tilda (~) in the URL.
- The URLs are not case-sensitive.
Action Versioning
Each API action has its own version number. This is to avoid breaking your program when the API is updated. By specifying the version number, you're protected from unexpected changes.
Getting Started
To get started, you will need to:
- Create an API key
- Review API actions (developer portal).
- Construct a test API request using the cURL command.
Create an API key
- In RetailOps, go to Administration > System Config > Users
- Select your user account. In the bottom-right of the User Details pane, press the [Add API Key] button.
- Your API key will appear in a separate window. Copy the API key from there.
Please note: For security purposes, when the API key appears in its separate window, this will be your only opportunity to view/copy the entire API key. Once you close the window, you will not be able to view the entire API key again (a truncated version appears under the Credentials pane to indicate that an API key was created previously).
Example API Calls
Action: Product.Sku.Search - Version 1
Request:
curl -v -XPOST \
-H 'Content-Type: application/json' \
-H 'apikey: YOUR_APIKEY_GOES_HERE__REMEMBER_THIS_IS_A_SECRET' \
-d '{"sku_string":"764"}' \
'https://api.retailops.com/product/sku/search~1.json'
Response:
{
"success":1,
"records":[
{
"sku_string":"764",
"status":"incomplete",
"family_id":"534",
"type":"standard",
"id":"780"
}
]
}
Action: Product.ExternalSku.update - Version 2
Request:
curl -v -XPOST \
-H 'Content-Type: application/json' \
-H 'apikey: YOUR_APIKEY_GOES_HERE__REMEMBER_THIS_IS_A_SECRET' \
-d '{"records": {"vendor_name":"Landis", "vpc":"LNDLV-6548-9321"} }' \
'https://api.retailops.com/product/externalsku/update~2.json'
Response:
{
"success": 1,
"records": [
{
"vpc": "LNDLV-6548-9321",
"vendor_id": "5",
"vendor_name": "Landis",
"id": "117",
"matched": 1
}
],
"matched": 1
}
Comments
0 comments
Please sign in to leave a comment.