Skip to main content

API for Marketplaces | ANYMARKET

Welcome to the ANYMARKET API documentation for Marketplaces.

This documentation aims to guide the rules and expected behaviors in the construction of the middleware responsible for the integration of information between ANYMARKET and MARKETPLACE.

image.png

The person responsible for the integration must build a Middleware application following the endpoint standards established in the topic of “remotes”. These remotes will be the paths that ANYMARKET will send notifications or queries to complete the actions that the seller performs.

Example Middleware URLs that will be notified
{{URL_MIDDLEWARE}}\sendproduct
{{URL_MIDDLEWARE}}\brands

After receiving the notifications and queries that ANYMARKET will forward to the middleware, it will need to interpret the calls and perform the appropriate actions to complete the Seller's requests, which may be internal processing of the marketplace itself or calls to the ANYMARKET API in order to enter information, update or consume data pertinent to the action being performed.

The Middleware application will be divided into two stages of operations that we will name:

REMOTES

The remotes will be the "paths" your API should contain. The ANYMARKET API will work as a notification system where we already have the remotes ready that will be triggered in the base URL of the API that you informed us when filling out the release document.


ANYMARKET API

ANYMARKET set of APIs that allow the middleware to insert information, update or consume data relevant to the action being performed.

In the image below we have the information that will be transferred through the middleware in a macro form:

image.png

In the "Middleware Remotes" topic of our documentation, there is more information about each notification or query that ANYMARKET performs in the middleware, which action the seller is requesting and the expected behaviors for each action, in order to guarantee the best experience for the Seller.

Integration steps

#StepResponsibleDescription
1Completing the "New Marketplace Release Form"MarketplaceThis form contains information such as the Middleware URL, fields required for authentication in the marketplace (login/password or token), description, behaviors)
2Release the Sandbox EnvironmentANYMARKETIn this step ANYMARKET will create the new channel based on the information in the form from the previous step and provide: User access to ANYMARKET for you to carry out tests during development. And also your "appId" which will be the identifier of your marketplace within ANYMARKET, this id must be used in all calls you make to our API.
3Building the MiddlewareMarketplaceStep of building the middleware by the marketplace.
4ApprovalANYMARKETAt this stage, our quality team will test the new marketplace to ensure that the integration complies with the expected acceptance criteria. More information about this process can be accessed in the topic "Approval Process" of our documentation.
5Marketplace release in BetaANYMARKETIn this step we follow the first 5 sellers, aiming to ensure that everything is working correctly in the production environment.
6Marketplace release in ProductionANYMARKETWe make the new marketplace available to all ANYMARKET Sellers.

How the integration works

To facilitate the understanding of how Middleware should work, below is a list of the Remotes that the middleware needs to make available and their objectives, the ANYMARKET APIs available for the middleware to complete the actions of the processes, in addition to the flow design of how the middleware communicates with ANYMARKET and Marketplace:

Remotes

POST/testIntegrationmandatoryIn this notification we send the authentication data in the marketplace configured by the Seller, so that the middleware validates the access.
POST/saveAccountmandatoryIn this notification we send the configuration data informed by the Seller if the middleware wants to store it.
GET/product/{{partnerId}}mandatoryThis query is used to obtain the advertisements from the marketplace, to link with the ANYMARKET broadcasts.
GET/brandsoptionalThis query is used to obtain the brands from the marketplace and link them to the ANYMARKET brands.
GET/categoriesoptionalThis query is used to obtain the marketplace categories and link them to the ANYMARKET categories.
GET/categories/{{id}}optionalThis query is used to obtain the child categories of the marketplace and link them to the ANYMARKET categories.
GET/categories/attributes/{{id}}optionalThis query is used to obtain the attributes of the marketplace and link to ANYMARKET products.
GET/variations/typesoptionalThis query is used to get the marketplace variations and link with the ANYMARKET variations.
POST/canActiveoptionalIn this notification we send a preview of the product/sku data so that the middleware can validate if it can be published on the marketplace. (Action triggered when the seller accesses the "New Publication" functionality)
GET/getDefaultSkuFieldsoptionalThis query is used for the marketplace to inform additional fields for the seller to fill in when including a "New Publication"
POST/canSavemandatoryIn this notification, we send a preview of the ad data so that the middleware can validate if it can be published in the marketplace. (Action triggered when the seller writes a "New Post").
POST/sendProductmandatoryIn this notification we send all changes made to an ad: New Post, Ad registration changes, Inventory changes, Price changes, Pause an ad, End an ad and Resend an ad.
DELETE/deletePublicationmandatoryThis notification will be triggered when a broadcast is deleted from the ANYMARKET dashboard, in order for the marketplace to inactivate the ad.
POST/order/force/{{id}}mandatoryWe will send this notification whenever the seller requests the resending of the order from the marketplace to ANYMARKET (Monitoring)
POST/forceImportOrdersmandatoryWe will send this notification when the seller requests to import all orders to the ANYMARKET panel (Configuration Screen).
GET/order/{{id}}mandatoryThis query is used to consult information about the marketplace order.
PUT/updateOrderStatusInMarketplacerequiredThis notification is sent whenever there is an order change in ANYMARKET, so that the middleware sees the updated order information and replicates to the marketplace.

ANYMARKET APIs

GET/api/configurationoptionalConsults all the settings made by the seller on ANYMARKET.
GET/api/configuration/{id}optionalQuery by account ID the settings made by the seller on ANYMARKET.
GET/skumarketplace/{id}mandatoryConsult the ad data on ANYMARKET.
PUT/skumarketplace/{id}mandatoryUsed to have the middleware mark the ad as up to date.
POST/ordersmandatoryUsed for the middleware to write the request to ANYMARKET.
PUT/orders/{id}/markAsPaidmandatoryUsed for the middleware to mark the order as PAID in ANYMARKET.
PUT/orders/{id}/markAsCanceledmandatoryUsed for the middleware to mark the order as CANCELLED in ANYMARKET.
PUT/orders/{id}/markAsShippedoptionalUsed for the middleware to mark the request as SENT in ANYMARKET.
PUT/orders/{id}/markAsDeliveredoptionalUsed for the middleware to mark the order as DELIVERED in ANYMARKET.
GET/orders/{id}mandatoryAllows the middlewar to query the order data in ANYMARKET.
PUT/orders/{id}/transmissionStatusmandatoryUsed for the middleware to mark the request as up to date.

Flow

Caption
ORANGEActions carried out by the Seller on the ANYMARKET panel
GREENRemotes that will be notified or consulted in MIDDLEWARE
YELLOWANYMARKET APIs that will be used in the processes
BLUEProcessing that ANYMARKET/MIDDLEWARE must perform after notifications

NovaAPIMarketplace7.png

Environments

Sandbox: http://sandbox-api.anymarket.com.br/marketplace/api

Production: https://api.anymarket.com.br/marketplace/api

Useful information

Operations

We do our best to make all our URLs RESTful. Each URL can support one of four different types of HTTP verbs:

GETget information about a resource
POSTcreate a resource
PUTupdates a resource
DELETEdelete a resource

Consumption limits

Be nice. If you are sending too many requests quickly, we will return an error code 429 (too many requests).

You have a limit of 10 requests per second per token


Questions, suggestions and feedbacks can be sent by email to:

api@anymarket.com.br.