Skip to content

Conversation

@alejorrojas
Copy link
Member

Proposed changes on /shipping/cost API

Summary of Changes

  • Request: Added required transport_type field
  • Response: Added estimated_delivery_at and delivery_address fields

Request Body

Before:

{
  "delivery_address": {
    "street": "Av. Dirac 1234",
    "city": "Resistencia", 
    "state": "Chaco",
    "postal_code": "H3500ABC",
    "country": "AR"
  },
  "products": [
    {
      "id": 1,
      "quantity": 2
    }
  ]
}

After:

{
  "delivery_address": {
    "street": "Av. Dirac 1234",
    "city": "Resistencia",
    "state": "Chaco", 
    "postal_code": "H3500ABC",
    "country": "AR"
  },
  "transport_type": "air",
  "products": [
    {
      "id": 1,
      "quantity": 2
    }
  ]
}

Response Body

Before:

{
  "currency": "ARS",
  "total_cost": 45.5,
  "transport_type": "air",
  "products": [
    {
      "id": 1,
      "cost": 20.0,
      "quantity": 2
    }
  ]
}

After:

{
  "currency": "ARS",
  "total_cost": 45.5,
  "transport_type": "air",
  "estimated_delivery_at": "2025-10-01T00:00:00Z",
  "delivery_address": {
    "street": "Av. Dirac 1234",
    "city": "Resistencia",
    "state": "Chaco",
    "postal_code": "H3500ABC",
    "country": "AR"
  },
  "products": [
    {
      "id": 1,
      "cost": 20.0,
      "quantity": 2
    }
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants