Skip to content

Webhooks

Webhooks allow you to get real-time programmatic notifications about changes to your data as they happen. Instead of pulling information through our API, webhooks will send information to your endpoint.

Order

Filters

Field Description
tenant_id Information owner identification

Response:

{
  "data": {
    "id": "f64871a0-b0b5-4603-870d-c6aeb74f2df9",
    "created_at": "2023-07-13T17:43:10.448884",
    "code": "TESTORDER0010",
    "parent": "",
    "purchased_at": "2022-06-15T18:21:50+00:00",
    "currency": "BRL",
    "normalizer": 100,
    "channel": {
      "id": "37ee157d-0d57-49e7-a51d-8f82c3d1e260",
      "extras": {}
    },
    "links": {
      "order": "https://id.magalu.com/accounts/dfb51775-56c5-43d5-b5fa-118529438ed3"
    },
    "agreement": {
      "created_at": "2023-07-13T17:43:10.449289",
      "buyer": {
        "extras": {},
        "id": "712fe442-4185-4123-b3e6-fa57a5ea5d0e"
      },
      "sellers": [
        {
          "extras": {},
          "id": "f01a6e65-45c5-42c5-a135-f92422c32ecd"
        }
      ],
      "recipients": [
        {
          "id": "2aadcd24-b942-4267-b9e7-43057bb45eb2",
          "address": {}
        }
      ],
      "items": [
        {
          "id": "b5f76c0c-85db-4159-ae8c-0d8e943df98e",
          "quantity": 3,
          "offer": "https://api.magalu.com/distribution/v1/786972da-b648-4c48-afef-8c447b21c0d3/offers/bcdcb30a-aee6-430c-910b-90dbc7029aca",
          "seller": "f01a6e65-45c5-42c5-a135-f92422c32ecd",
          "sku": {
            "code": "PROD01654-XYZ-MED",
            "price": 1500
          },
          "total": 4500,
          "extras": {}
        }
      ],
      "deliveries": [
        {
          "id": "b92d568f-7ec8-423c-aed8-75224fcaaf50",
          "quantity": 3,
          "item": "b5f76c0c-85db-4159-ae8c-0d8e943df98e",
          "recipient": "2aadcd24-b942-4267-b9e7-43057bb45eb2",
          "total": 1500,
          "pickup_points": [],
          "periods": [],
          "extras": {}
        }
      ],
      "discounts": [
        {
          "id": "ff56b762-24b9-4ab9-bd04-754c47a24fe7",
          "apply_to": "b5f76c0c-85db-4159-ae8c-0d8e943df98e",
          "value": 200,
          "extras": {}
        }
      ],
      "payments": [
        {
          "id": "a67244e4-95fd-41a0-a6f9-6e19538680b8",
          "processor": {
            "id": "a36f17ee-cd34-44e7-a41f-0aea8dce1b82",
            "extras": {}
          },
          "method": "credit",
          "installments": [
            {
              "date": "2022-03-15",
              "value": 200
            }
          ],
          "value": 5800,
          "extras": {}
        }
      ],
      "total": {
        "items": 4500,
        "deliveries": 1500,
        "discounts": 200,
        "total": 5800,
        "payments": 5800
      },
      "id": "b3e79657-4476-4704-8b06-38eead845c92"
    },
    "type": "created_order"
  }
}