Ordenes

Actualiza una orden

   PATCH /api/v1/orders/:id

El endpoint permite actualizar la información de una orden.

patch/api/v1/orders/{order_id}

Request

  • Base URL: https://api-pro.skydropx.com
  • URL: https://api-pro.skydropx.com/api/v1/orders/{order_id}
  • Auth: HTTP bearer

Path parameters

order_idstring required

Request body

OR
OR

Example request

{
  "order_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "order": {
    "total_price": "57.00",
    "payment_status": "paid",
    "shipping": {
      "service": "me2",
      "price": "100.00"
    },
    "parcels": [
      {
        "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "weight": 10,
        "mass_unit": "KG",
        "length": 10,
        "width": 10,
        "height": 10,
        "quantity": 1,
        "dimension_unit": "CM",
        "package_type": "7H1",
        "products": [
          {
            "name": "Bicicleta",
            "hs_code": "9560.63",
            "sku": "BIC-001",
            "price": "57.00",
            "quantity": 1,
            "weight": 10,
            "height": 10,
            "length": 10,
            "width": 10
          }
        ]
      }
    ],
    "shipper_address": {
      "address_template_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "address": "Vía Industrial",
      "internal_number": "100",
      "reference": "Planta nuclear",
      "sector": "Asarco",
      "city": "Monterrey",
      "state": "Nuevo León",
      "postal_code": "64550",
      "country": "MX",
      "person_name": "Homero Simpson",
      "company": "Inversiones Montgomery Burns S.A.S de C.V.",
      "phone": "4434434444",
      "email": "homero@burns.com",
      "tax_id_number": "XAXX010101000"
    },
    "recipient_address": {
      "address_template_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "address": "Avenida Siempre Viva",
      "internal_number": "742",
      "reference": "Casa color durazno.",
      "sector": "La Finca",
      "city": "Monterrey",
      "state": "Nuevo León",
      "postal_code": "64000",
      "country": "MX",
      "person_name": "Bart Simpson",
      "company": "Casa de Bart S.A.S de C.V.",
      "phone": "4434434444",
      "email": "bart@simpson.com",
      "further_information": "Dejar con el vecino",
      "tax_id_number": "123456789"
    }
  }
}

Response

Orden actualizada

Example response

{
  "data": {
    "id": "9e270243-762f-40c8-833e-ef1c4ee8282d",
    "type": "order",
    "attributes": {
      "id": "9e270243-762f-40c8-833e-ef1c4ee8282d",
      "tags": [
        "tag1",
        "tag2"
      ],
      "platform": "Shopify",
      "ecommerce_id": "SDFG",
      "payment_status": "paid",
      "price": 10,
      "shipping_preferences": [
        {
          "service": "me2",
          "price": "100.00"
        }
      ],
      "payment_type": "COD",
      "shipment_purpose": "goods",
      "customs_payment_payer": "recipient",
      "created_at": "2025-01-07T14:46:38.203-06:00",
      "address_from": {
        "area_level1": "Nuevo León",
        "area_level2": "Monterrey",
        "area_level3": "La Finca",
        "name": "Name",
        "postal_code": "64000",
        "country_code": "MX",
        "street1": "Olivo 4618",
        "phone": "1242452456",
        "email": "email@example.com",
        "reference": "Green house",
        "address_type": "from",
        "tax_id_number": "XAXX010101000",
        "tax_id_type": "rfc"
      },
      "address_to": {
        "area_level1": "Monterrey Centro",
        "area_level2": "Monterrey",
        "area_level3": "La finca",
        "name": "Mayra Doe",
        "postal_code": "64000",
        "country_code": "MX",
        "street1": "22 Main St",
        "company": "ACS Inc.",
        "phone": "1234567890",
        "email": "jhon@doe.com",
        "reference": "Near the park",
        "address_type": "to",
        "apartment_number": "123",
        "tax_id_number": "XAXX010101000",
        "tax_id_type": "rfc"
      },
      "parcel": {
        "weight": 2,
        "length": 10,
        "width": 10,
        "height": 10,
        "declared_value": 120.5,
        "package_number": 1,
        "package_type": "4G",
        "consignment_note": "24121500",
        "dimension_unit": "cm",
        "mass_unit": "kg"
      }
    },
    "relationships": {
      "items": {
        "data": [
          {
            "id": "c2092234-1b85-41a2-a200-858d052c0ad1",
            "type": "item"
          }
        ]
      },
      "shipments": {
        "data": [
          {
            "id": "9eae25ba-11b4-4b9f-9b01-3d09da8bc12d",
            "type": "shipment"
          }
        ]
      }
    }
  },
  "included": [
    {
      "id": "c2092234-1b85-41a2-a200-858d052c0ad1",
      "type": "item",
      "attributes": {
        "name": "prueba",
        "sku": "prueba",
        "hs_code": "9560.63",
        "hs_code_description": "Bicycles",
        "description_en": "Mountain bike",
        "product_type_code": "60141200",
        "product_type_name": "Bicycles",
        "country_code": "MX",
        "quantity": 2,
        "price": 15,
        "weight": 20,
        "height": 30,
        "width": 30,
        "length": 30
      }
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.