adobe / commerce-integration-starter-kit

Adobe's integration starter kit uses Adobe Developer App Builder to improve real-time connection reliability and reduce the time-to-market for integrations between Adobe Commerce and other back-office systems, such as ERPs, CRMs, and PIMs.
Apache License 2.0
6 stars 2 forks source link

ACSP-230 The shipment examples use POST /shipment instead of POST /order/{orderId}/ship #18

Closed rubencougil closed 2 months ago

rubencougil commented 2 months ago

The shipment examples use POST /shipment instead of POST /order/{orderId}/ship

Description

see https://github.com/adobe/commerce-integration-starter-kit/issues/12

Related Issue

https://github.com/adobe/commerce-integration-starter-kit/issues/12

Motivation and Context

see https://github.com/adobe/commerce-integration-starter-kit/issues/12

How Has This Been Tested?

For an existing order in Commerce

image

Screenshots (if appropriate):

Types of changes

Checklist:

rojoangel commented 2 months ago

In 3b237d4 I made the payload compatible with https://adobe-commerce.redoc.ly/2.4.7-admin/tag/orderorderIdship#operation/PostV1OrderOrderIdShip

{
  "items": [
    {
      "extension_attributes": {},
      "order_item_id": 0,
      "qty": 0
    }
  ],
  "notify": true,
  "appendComment": true,
  "comment": {
    "extension_attributes": {},
    "comment": "string",
    "is_visible_on_front": 0
  },
  "tracks": [
    {
      "extension_attributes": {},
      "track_number": "string",
      "title": "string",
      "carrier_code": "string"
    }
  ],
  "packages": [
    {
      "extension_attributes": {}
    }
  ],
  "arguments": {
    "extension_attributes": {
      "source_code": "string"
    }
  }
}

For example, note that the payload is not wrapped in an entity JSON object

rojoangel commented 2 months ago

I've added how the change was tested to the PR description 😉