This article aims to provide some guidance and common use cases for the MarketTime Public API.
MarketTime's API documentation may be found at https://markettime.com/api
To access a Postman Collection for use within the Postman app to access MarketTime's API endpoints for your use, click HERE.
Unzip the file and import the Collection into Postman.
Fill in all relevant/required fields (such as x-api-key and RepGroup/ManufacturerIDs, and it will be ready to use.
For release notes related to our Public API, see THIS PAGE.
NOTE: The use of MarketTime's Public API is a feature of the Manufacturer Elite and Sales Agency Elite subscriptions or higher. Your API Key is provided by MarketTime Staff.
Please fill out THIS FORM to learn more about order delivery and product management solutions via our API.
Manufacturers
The endpoints noted below are for those who have a Manufacturer account and receive orders and manage their products.
Importing/Updating/Retrieving Items
Method | Endpoint |
PUT | /mtpublic/api/v1/{whoAmI}/items/upsert |
GET | /mtpublic/api/v1/{whoAmI}/items/get |
Things to Know
- The "Who Am I" identifier within each API endpoint denotes your Manufacturer ID (M123).
- The Items Upsert endpoint for items provides the ability to both create new items and update existing items within MarketTime, depending on your need.
- If you are creating new items, the recordID field should be NULL.
- If updating existing items, the recordID field should contain the itemID of the specified item. Alternatively, you may use the item number.
- If using the item number, set the useItemNumber parameter as true and provide the item number in the request body.
- There are individual POST and PUT endpoints for managing items as well.
- POST Item: /mtpublic/api/v1/{whoAmI}/items
- PUT Item: /mtpublic/api/v1/{whoAmI}/items/{whatItemDoIWantToUpdate}
- To utilize filters, such as date added, item number, name, etc., to specify your query, use the GET endpoint.
- To retrieve a list of existing items, use the GET endpoint.
Retrieving Orders
Method |
Endpoint |
GET |
/mtpublic/api/v1/{whoAmI}/orders/get |
This GET orders endpoint provides the ability to retrieve orders from your Manufacturer Account.
Things to Know
- This endpoint allows for the use of filters to specify the data you want to retrieve (e.g. Status, PO Number, Ship Date, etc.).
- You will be able to retrieve up to 250 orders per call.
Updating Orders
Method |
Endpoint |
PUT |
/mtpublic/api/v1/{whoAmI}/orders/{whatOrderDoIWantToUpdate} |
This PUT orders endpoint provides the ability to update orders that have been transmitted to your Manufacturer Account.
Things to Know
- To update an existing order, you will need to provide the recordID (order ID) in the "whatOrderDoIWantToUpdate" parameter within the endpoint.
- You also need to provide the order ID in the recordID field within the request body.
- Manufacturers may only update the Manufacturer Status of the specified order via this endpoint.
Retrieving Customers
Method |
Endpoint |
GET | /mtpublic/api/v1/{whoAmI}/customers/get |
This endpoint provides the ability to retrieve customers from your Manufacturer account.
Things to Know
- Calling this endpoint as a manufacturer requires the regroupID (R123).
- You can retrieve as many as 250 customer records per call.
=====================================
Sales Agencies/Order Writers
The endpoints noted below are for those with an Agency account and write orders within it.
Importing/Updating/Retrieving Items
Method | Endpoint |
PUT | /mtpublic/api/v1/{whoAmI}/items/upsert |
GET | /mtpublic/api/v1/{whoAmI}/items/get |
Things to Know
- The "Who Am I" identifier within each API endpoint denotes your RepgroupID (R123)
- The Item Upsert endpoint requires that the manufacturerID is specified for each new item to be created so that items get posted correctly.
- If you are creating new items, the recordID field should be NULL.
- If updating existing items, the recordID field should contain the itemID of the specified item. Alternatively, you may use the item number.
- If using the item number, set the useItemNumber parameter as true and provide the item number in the request body.
- There are individual POST and PUT endpoints for managing items as well.
- POST Item: /mtpublic/api/v1/{whoAmI}/items
- PUT Item: /mtpublic/api/v1/{whoAmI}/items/{whatItemDoIWantToUpdate}
- To utilize filters, such as date added, item number, name, etc., to specify your query, use the GET endpoint.
- To retrieve a list of existing items, use the GET endpoint.
Importing Orders from an External Source
Method |
Endpoint |
POST |
/mtpublic/api/v1/{whoAmI}/orders |
This endpoint is used when a company wishes to populate MarketTime with orders that originated from an external source (such as an ERP or CRM).
Things to Know
- Ensure that all fields noted as required are populated.
- When posting an order, you may choose to use the retailerExternalID in place of the retailerID (B123).
- The retailer external ID can be added to the customer's record through the account number field on the Repgroup Retailer Manufacturer table on the MarketTime user interface or via the Post Customer endpoint under the externalID field.
- If you choose to use the retailerExternalID, set the useretailerExternalID parameter as true and provide the retailerExternalID in the request body.
Updating Orders
Method |
Endpoint |
PUT | /mtpublic/api/v1/{whoAmI}/orders/{whatOrderDoIWantToUpdate} |
This endpoint is used to update an existing order in MarketTime.
Things to Know
- To update an existing order, you will need to provide the recordID (order ID) in the "whatOrderDoIWantToUpdate" parameter within the endpoint.
- You also need to provide the order ID in the recordID field within the request body.
- You cannot update the manufacturer order status if you are calling the endpoint as a repgroup.
Retrieving Orders
Method |
Endpoint |
GET |
/mtpublic/api/v1/{whoAmI}/orders/get |
This GET orders endpoint provides the ability to retrieve orders from your Repgroup Account.
Things to Know
- This endpoint allows for the use of filters to specify the data you want to retrieve (e.g. Status, PO Number, Ship Date, etc.).
- You will be able to retrieve up to 250 orders per call.
Importing/Updating/Retrieving Customers
Method | Endpoint |
PUT | /mtpublic/api/v1/{whoAmI}/customers/{whoseInfoDoIWantToUpsert}/upsert |
GET | /mtpublic/api/v1/{whoAmI}/customers/get |
Things to Know
- The Upsert endpoint for customers provides the ability to both create new customers and update existing customers within MarketTime, depending on your need.
- If creating a new customer, the recordID field should be NULL.
- To update an existing customer, you will need to provide the customerID (B123) in the "whatOrderDoIWantToUpsert" parameter within the endpoint.
- You also need to provide the customer ID in the recordID field within the request body.
- There are individual POST and PUT endpoints for managing customers as well.
- POST customers endpoint: /mtpublic/api/v1/{whoAmI}/customers
- PUT customers endpoint: /mtpublic/api/v1/{whoAmI}/customers/{whoseInfoDoIWantToUpdate}
- To utilize filters, such as date added, customer number, name, etc., to specify your query, use the GET endpoint.
- To retrieve a list of existing customers, use the GET endpoint.
- The maximum number of Ship To locations or Contacts that can be created per call is 50.
- To update the ship to location and customer contact data, you will need to call the respective PUT endpoints:
- PUT ship to location endpoint: /mtpublic/api/v1/{whoAmI}/customers/{customerId}/shiptolocation/{shipToLocationId}
- PUT contact endpoint: /mtpublic/api/v1/{whoAmI}/customers/{customerId}/contact/{contactId}