Al crear un envío con Spring Omni, puede obtener un error en la respuesta, como se menciona a continuación:
[estado] => 404 [código] => 10002 [recurso] => recurso no encontrado [detalle] => no se pudo encontrar uno o más recursos de la región. Recibimos este error al enviar la siguiente solicitud para crear el envío:
'{ "data": { "type": "shipments", "attributes": { "recipient_address": { "street_1": "4363 N 55TH ST", "street_2": "Marylebone", "street_number": 221, "postal_code": "53216-1201", "city": "MILWAUKEE", "region_code": "WI", "country_code": "US", "first_name": "Sherlock", "last_name": "Holmes", "company": "Attn", "email": "Aparajita.singh@abc.com", "phone_number": "1234567890" }, "return_address": { "street_1": "Baker Street", "street_2": "Marylebone", "street_number": 221, "street_number_suffix": "B", "postal_code": "NW1 6XE", "city": "London", "region_code": "ENG", "country_code": "GB", "first_name": "Sherlock", "last_name": "Holmes", "company": "Holmes Investigations", "email": "Aparajita.singh@abc.com", "phone_number": "" }, "sender_address": { "street_1": "Baker Street", "street_2": "Marylebone", "street_number": 221, "street_number_suffix": "B", "postal_code": "NW1 6XE", "city": "London", "region_code": "ENG", "country_code": "GB", "first_name": "Sherlock", "last_name": "Holmes", "company": "Holmes Investigations", "email": "Aparajita.singh@abc.com", "phone_number": "" }, "description": "Order #8008135", "physical_properties": { "height": 150, "width": 300, "length": 500, "volume": 22.5, "weight": 100 }, "items": [ { "sku": "123456789", "description": "OnePlus X", "item_value": { "amount": 995, "currency": "EUR" }, "quantity": 2, "hs_code": "8517.12.00", "origin_country_code": "GB", "item_weight": 135 } ], "customs": { "content_type": "merchandise", "invoice_number": "9000", "non_delivery": "return", "incoterm": "DAP", "license_number": "218532158", "certificate_number": "12122121" }, "register_at": 0 }, "relationships": { "shop": { "data": { "type": "shops", "id": "1a9414f0-24ef-4008-b6ad-9a75e27a879e" } }, "service": { "data": { "type": "services", "id": "05aeb5e9-90be-4ec7-94c9-1a0949262577" } } } } }'
Cuando preguntamos a Spring Global por la causa de este error, respondieron que el problema aquí es "La región que no está reconocida porque aún no tienen una región para los EE. UU. Creada". Simplemente omitir la región debería solucionar este problema. El siguiente JSON debería funcionar:
'{ "data": { "type": "shipments", "attributes": { "recipient_address": { "street_1": "4363 N 55TH ST", "street_2": "Marylebone", "street_number": 221, "postal_code": "53216-1201", "city": "MILWAUKEE", "country_code": "US", "first_name": "Sherlock", "last_name": "Holmes", "company": "Attn", "email": "Aparajita.singh@abc.com", "phone_number": "1234567890" }, "return_address": { "street_1": "Baker Street", "street_2": "Marylebone", "street_number": 221, "street_number_suffix": "B", "postal_code": "NW1 6XE", "city": "London", "region_code": "ENG", "country_code": "GB", "first_name": "Sherlock", "last_name": "Holmes", "company": "Holmes Investigations", "email": "Aparajita.singh@abc.com", "phone_number": "" }, "sender_address": { "street_1": "Baker Street", "street_2": "Marylebone", "street_number": 221, "street_number_suffix": "B", "postal_code": "NW1 6XE", "city": "London", "region_code": "ENG", "country_code": "GB", "first_name": "Sherlock", "last_name": "Holmes", "company": "Holmes Investigations", "email": "Aparajita.singh@abc.com", "phone_number": "" }, "description": "Order #8008135", "physical_properties": { "height": 150, "width": 300, "length": 500, "volume": 22.5, "weight": 100 }, "items": [ { "sku": "123456789", "description": "OnePlus X", "item_value": { "amount": 995, "currency": "EUR" }, "quantity": 2, "hs_code": "8517.12.00", "origin_country_code": "GB", "item_weight": 135 } ], "customs": { "content_type": "merchandise", "invoice_number": "9000", "non_delivery": "return", "incoterm": "DAP", "license_number": "218532158", "certificate_number": "12122121" }, "register_at": 0 }, "relationships": { "shop": { "data": { "type": "shops", "id": "1a9414f0-24ef-4008-b6ad-9a75e27a879e" } }, "service": { "data": { "type": "services", "id": "05aeb5e9-90be-4ec7-94c9-1a0949262577" } } } } }'
Por favor visite aquí para información relacionada:
Error de Spring Global (Spring Omni): la propiedad phone_number es obligatoria
Error de Spring Global (Spring Omni): el envío no se está registrando
Spring Global (Spring Omni): concepto de facturación
Error global de Spring (Omni de primavera): obtener una respuesta en blanco al recuperar la etiqueta