Shipping Methods API Endpoints

Shipping Methods

The Shipping Methods API provides endpoints for managing shipping options available in your system. These endpoints allow you to create, retrieve, update, and delete shipping methods for your products and services.

Base URL: https://www.venddor.com.br/api
GET POST /shippings

Access all shipping methods or create a new shipping method.

Supported Methods

Method Description
GET Retrieve all shipping methods
POST Create a new shipping method
GET Response Example
POST Request Example
{
  "data": [
    {
      "id": "ship_001",
      "name": "Standard Delivery",
      "description": "3-5 business days shipping",
      "price": 15.90,
      "delivery_time": "3-5 days",
      "active": true,
      "created_at": "2025-01-15T10:30:00Z"
    },
    {
      "id": "ship_002",
      "name": "Express Delivery",
      "description": "Next day shipping for orders placed before 2pm",
      "price": 29.90,
      "delivery_time": "1 day",
      "active": true,
      "created_at": "2025-01-15T10:35:00Z"
    }
  ],
  "meta": {
    "total": 5,
    "page": 1,
    "per_page": 10
  }
}
{
  "name": "Premium Delivery",
  "description": "Same day delivery for local orders",
  "price": 39.90,
  "delivery_time": "Same day",
  "active": true,
  "restrictions": {
    "max_distance": 50,
    "max_weight": 20,
    "regions": ["São Paulo - Capital"]
  }
}
Tip: When creating a shipping method, consider adding restrictions for weight, dimensions, or delivery regions to prevent issues with order fulfillment.
GET PUT DELETE /shippings/:id

Access, update, or delete a specific shipping method by its ID.

Path Parameters

Parameter Type Description
id* string The unique identifier of the shipping method

Supported Methods

Method Description
GET Retrieve a specific shipping method
PUT Update a specific shipping method
DELETE Delete a specific shipping method

Example PUT Request

{
  "price": 35.90,
  "description": "Updated: Same day delivery for local orders",
  "active": true
}

Response Status Codes

Status Code Description
200 OK Operation completed successfully
400 Bad Request Invalid request parameters
404 Not Found Shipping method with the specified ID does not exist
409 Conflict Cannot delete a shipping method that is in use by orders
Important: Deleting a shipping method that is associated with existing orders may cause issues. Consider deactivating it instead by setting active: false.