Skip to content

Skus, Prices and Inventories

To facilitate the testing process in a sandbox environment, we have provided an endpoint that will assist you in creating test SKUs, prices, and inventories by triggering events to the sandbox webhook URL registered in your application.

Note

Remember that you need to have carried out onboarding and to receive the webhooks you need to have carried out step 6 when creating the client.

Note

For more information about webhooks, see Webhooks.

Available flows

Name Description
simple Magalu simple sku, price and inventory flow Detail

Details of available flows

Simple

Description: Magalu simple sku, price and inventory flow.

Creation of the test sku contemplating:

  • 1 data sheet
  • Condition like new

Creation of the test price contemplating:

  • Type sell
  • 1 sku
  • 1 channel

Creation of the test inventory contemplating:

  • 1 sku
  • 1 channel

1 sku, 1 price and 1 inventory will be created per call.

Run test

URL Parameters

Field Type Description Required
id uuid4 Sku identifier Yes
name text Flow name, to view available flows, see here Yes

Request:

curl -X 'PUT' \
  'https://api-sandbox.magalu.com/v0/portfolios/{id}/tests/{name}' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer <Access Token>' \
  -H 'Content-Type: application/json' \
  -d '{}'

Response:

{
  "test": "simple",
  "id": "42aa89d3-d087-485e-b858-0dab8c545bf5"
}

Return code

Note

For more information about status code, see Return code

Code Description
201 Created
303 See Other
404 Not Found
422 Unprocessable Entity