Saltar al contenido

Asignar método de envío

Fija método, destino y horario de envío del borrador y devuelve el borrador.

Parámetros de ruta

draftId*string

Identificador del borrador de pedido.

Parámetros de cabecera

x-Store-Id?string

Tienda sobre la que actúa la solicitud. No hace falta cuando el token ya está vinculado a una tienda.

Authorization*string

Token bearer OAuth 2.0.

Cuerpo de la solicitud

application/json

Definiciones TypeScript

Usa esta definición en TypeScript.

Cuerpo de la respuesta

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X PUT "https://api.ecomiq.pe/api/v1/order-drafts/7204558912004324769/shipping-method" \  -H "x-Store-Id: <store-id>" \  -H "Authorization: Bearer <token>" \  -H "Content-Type: application/json" \  -d '{    "shippingMethodId": "7204558912004325207",    "target": "automatic",    "sellerId": "7204558912004323447",    "shippingProfileId": "7204558912004329819",    "rateId": "7204558912004322088",    "targetId": "7204558912004322457",    "scheduledDate": "2026-09-28",    "scheduledTime": "09:00:00"  }'
{  "id": "7204558912004325350",  "storeId": "7204558912004327977",  "customerId": "7204558912004326262",  "cartId": "7204558912004325176",  "draftNumber": "Mi tienda",  "currencyCode": "PEN",  "source": "Tienda online",  "notes": "Entregar después de las 18:00.",  "email": "andrea.ramos@example.com",  "phone": "+51987654321",  "firstName": "Andrea",  "lastName": "Ramos",  "identificationType": "DNI",  "identificationNumber": "45678912",  "entityTaxId": "7204558912004326352",  "entityName": "Comercial Lima SAC",  "status": "draft",  "draftDate": "2026-09-28T15:30:00Z",  "sentAt": "2026-09-28T15:30:00Z",  "viewedAt": "2026-09-28T15:30:00Z",  "acceptedAt": "2026-09-28T15:30:00Z",  "rejectedAt": "2026-09-28T15:30:00Z",  "expiredAt": "2026-09-28T15:30:00Z",  "cancelledAt": "2026-09-28T15:30:00Z",  "convertedAt": "2026-09-28T15:30:00Z",  "shareToken": "replace_with_the_issued_token",  "shareExpiresAt": "2026-09-28T15:30:00Z",  "allowAnonymousShareAccess": false,  "sharedAt": "2026-09-28T15:30:00Z",  "billingAddress": {    "address1": "Av. Larco 1234",    "city": "Lima",    "countryCode": "PE",    "name": "Mi tienda",    "company": "Comercial Lima SAC",    "address2": "Dpto. 501",    "province": "Lima",    "postalCode": "15074"  },  "shippingAddress": {    "address1": "Av. Larco 1234",    "city": "Lima",    "countryCode": "PE",    "name": "Mi tienda",    "company": "Comercial Lima SAC",    "address2": "Dpto. 501",    "province": "Lima",    "postalCode": "15074"  },  "metadata": {},  "subTotal": 178,  "discount": 10,  "shipping": 1,  "tax": 1,  "warranty": 1,  "total": 178,  "paymentMethod": "Tarjeta de crédito",  "paymentCode": "card",  "items": [    {      "id": "7204558912004325350",      "productId": "7204558912004322039",      "sellerId": "7204558912004323447",      "shippingProfileId": "7204558912004329819",      "variantId": "7204558912004323197",      "title": "Polo de algodón",      "subtitle": "Polo de algodón",      "thumbnail": "https://mi-tienda.ecomiq.app/images/polo-de-algodon.webp",      "quantity": 2,      "unitPrice": 89,      "subTotal": 178,      "discount": 10,      "shipping": 1,      "tax": 1,      "warranty": 1,      "total": 178,      "requiresShipping": false,      "isTaxInclusive": false,      "modifiers": [        {          "id": "7204558912004325350",          "modifierGroupId": "7204558912004324624",          "modifierGroupName": "Personalización",          "modifierOptionId": "7204558912004327012",          "modifierOptionName": "Bordado",          "value": "Mi tienda",          "quantity": 2,          "priceDelta": 89        }      ],      "metadata": {}    }  ],  "shippingMethods": [    {      "id": "7204558912004325350",      "name": "Mi tienda",      "description": "Polo de algodón pima para uso diario.",      "subtotal": 178,      "discountTotal": 178,      "taxTotal": 178,      "total": 178,      "isTaxInclusive": false,      "sellerId": "7204558912004323447",      "shippingProfileId": "7204558912004329819",      "shippingMethodId": "7204558912004325207",      "connectionId": "7204558912004329542",      "providerName": "Courier Lima",      "trackingCode": "PE1234567890",      "estimatedDays": 30,      "zoneCode": "LIMA",      "locationId": "7204558912004328277",      "pickupPointId": "7204558912004324876",      "scheduledDate": "2026-09-28",      "scheduledTime": "09:00:00",      "data": {}    }  ],  "createdOn": "2026-09-28T15:30:00Z",  "updatedOn": "2026-09-28T15:30:00Z"}