amzn / selling-partner-api-models

This repository contains OpenAPI models for developers to use when developing software to call Selling Partner APIs.
Apache License 2.0
611 stars 733 forks source link

[BUG] [SP-API] [Issue] Vendor Shipments API v1 does not work in the sandbox #2569

Closed Piero0o closed 1 year ago

Piero0o commented 1 year ago

I'm submitting a...

[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

When using the Vendor Shipments API v1 reference (https://developer-docs.amazon.com/sp-api/docs/vendor-shipments-api-v1-reference), we encountered some issues. The GetShipmentDetails, SubmitShipments, and GetShipmentLabels endpoints not work in the sandbox environment. These endpoints were added two months ago. We want to follow up these updates. I guess, we are met with some bugs.

Vendor Shipments API v1

Current Behavior

  1. When using GetShipmentDetails and GetShipmentLabels endpoints with same sandbox request parameters "vendorShipmentIdentifier=12345678", I get result: {"code":"InvalidInput","message":"Could not match input arguments"}. I don't know what's worry with that.
  2. In swagger model for SubmitShipments, we found the value of packedQuantity.unitOfMeasure in x-amazon-spds-sandbox-behaviors is "Each", but the enum should be "Eaches".
  3. In swagger model for SubmitShipments, we found some date-time value using LocalDateTime format "yyyy-MM-ddThh:mm:ss.sss". But the date-time class of my java model generated by swagger-codegen-cli is OffsetDateTime. It cannot parse "yyyy-MM-ddThh:mm:ss.sss" directly. I know I could have added a “z” after the date-time as OffsetDateTime, but I don't know if that would have affected the sandbox result.

Context/Screenshots

swagger model for GetShipmentDetails and GetShipmentLabels in Vendor Shipments API v1:

"x-amazon-spds-sandbox-behaviors": [
    {
        "request": {
            "parameters": {
                "vendorShipmentIdentifier": {
                    "value": "12345678"
                }
            }
        }
    }
]

swagger model for SubmitShipments in Vendor Shipments API v1:

"x-amazon-spds-sandbox-behaviors": [
    {
        "request": {
            "parameters": {
                "body": {
                    "value": {
                        "shipments": [
                            {
                                "vendorShipmentIdentifier": "00050003",
                                "buyerReferenceNumber": "1234567",
                                "transactionType": "New",
                                "transactionDate": "2019-08-07T19:56:45.632",           <---- here
                                "shipmentFreightTerm": "Collect",
                                "sellingParty": {
                                    "partyId": "PQRSS"
                                },
                                "shipFromParty": {
                                    "address": {
                                        "name": "ABC electronics warehouse",
                                        "addressLine1": "DEF 1st street",
                                        "city": "Lisses",
                                        "stateOrRegion": "abcland",
                                        "postalCode": "91090",
                                        "countryCode": "DE"
                                    },
                                    "partyId": "999US"
                                },
                                "shipToParty": {
                                    "partyId": "ABCDF"
                                },
                                "shipmentMeasurements": {
                                    "totalCartonCount": 30,
                                    "totalPalletStackable": 30,
                                    "totalPalletNonStackable": 30,
                                    "shipmentWeight": {
                                        "unitOfMeasure": "Kg",
                                        "value": "120.45"
                                    },
                                    "shipmentVolume": {
                                        "unitOfMeasure": "CuFt",
                                        "value": "2.4"
                                    }
                                },
                                "collectFreightPickupDetails": {
                                    "requestedPickUp": "2019-08-07T19:56:45.632"           <---- here
                                },
                                "purchaseOrders": [
                                    {
                                        "purchaseOrderNumber": "1BBBAAAA",
                                        "items": [
                                            {
                                                "itemSequenceNumber": "001",
                                                "vendorProductIdentifier": "9782700001659",
                                                "buyerProductIdentifier": "9782700001610",
                                                "shippedQuantity": {
                                                    "amount": 100,
                                                    "unitOfMeasure": "Eaches",
                                                    "unitSize": 1
                                                },
                                                "maximumRetailPrice": {
                                                    "currencyCode": "USD",
                                                    "amount": "90.80"
                                                }
                                            }
                                        ]
                                    }
                                ],
                                "importDetails": {
                                    "methodOfPayment": "PaidByBuyer",
                                    "sealNumber": "0010101",
                                    "route": {
                                        "stops": [
                                            {
                                                "functionCode": "PortOfDischarge",
                                                "locationIdentification": {
                                                    "type": "string",
                                                    "locationCode": "string",
                                                    "countryCode": "US"
                                                },
                                                "arrivalTime": "2021-07-12T22:22:25.038Z",
                                                "departureTime": "2021-07-12T22:22:25.038Z"
                                            }
                                        ]
                                    },
                                    "importContainers": "string",
                                    "billableWeight": {
                                        "unitOfMeasure": "G",
                                        "value": "string"
                                    },
                                    "estimatedShipByDate": "2021-07-12T22:22:25.038Z"
                                },
                                "containers": [
                                    {
                                        "containerType": "carton",
                                        "containerSequenceNumber": "001",
                                        "containerIdentifiers": [
                                            {
                                                "containerIdentificationType": "SSCC",
                                                "containerIdentificationNumber": "4251245123534"
                                            }
                                        ],
                                        "trackingNumber": "1Z69663R0347795889",
                                        "dimensions": {
                                            "length": "12",
                                            "width": "12",
                                            "height": "12",
                                            "unitOfMeasure": "IN"
                                        },
                                        "weight": {
                                            "unitOfMeasure": "KG",
                                            "value": "10"
                                        },
                                        "packedItems": [
                                            {
                                                "itemSequenceNumber": "001",
                                                "buyerProductIdentifier": "B07DFVDRAA",
                                                "vendorProductIdentifier": "12312412421",
                                                "packedQuantity": {
                                                    "amount": 1,
                                                    "unitOfMeasure": "Each"                            <---- here
                                                },
                                                "itemDetails": {
                                                    "purchaseOrderNumber": "MBvnLr0fw",
                                                    "lotNumber": "10101010",
                                                    "expiry": {
                                                        "manufacturerDate": "2021-07-12T22:22:25.038Z",
                                                        "expiryDate": "2021-07-12T22:22:25.038Z",
                                                        "expiryAfterDuration": {
                                                            "durationUnit": "Days",
                                                            "durationValue": 0
                                                        }
                                                    }
                                                }
                                            }
                                        ]
                                    },
                                    {
                                        "containerType": "pallet",
                                        "containerSequenceNumber": "002",
                                        "containerIdentifiers": [
                                            {
                                                "containerIdentificationType": "SSCC",
                                                "containerIdentificationNumber": "ATR123213216"
                                            }
                                        ],
                                        "trackingNumber": "TRACK12345",
                                        "dimensions": {
                                            "length": "12",
                                            "width": "12",
                                            "height": "12",
                                            "unitOfMeasure": "IN"
                                        },
                                        "weight": {
                                            "unitOfMeasure": "KG",
                                            "value": "10"
                                        },
                                        "tier": 2,
                                        "block": 2,
                                        "innerContainersDetails": {
                                            "containerCount": 10,
                                            "containerSequenceNumbers": [
                                                {
                                                    "containerSequenceNumber": "002"
                                                },
                                                {
                                                    "containerSequenceNumber": "003"
                                                }
                                            ]
                                        },
                                        "packedItems": [
                                            {
                                                "itemSequenceNumber": "001",
                                                "buyerProductIdentifier": "B07DFVDRAA",
                                                "vendorProductIdentifier": "12312412421",
                                                "packedQuantity": {
                                                    "amount": 1,
                                                    "unitOfMeasure": "Each"                                 <---- here
                                                },
                                                "itemDetails": {
                                                    "purchaseOrderNumber": "MBvnLr0fw",
                                                    "lotNumber": "101001",
                                                    "expiry": {
                                                        "manufacturerDate": "2021-07-12T22:22:25.038Z",
                                                        "expiryDate": "2021-07-12T22:22:25.038Z",
                                                        "expiryAfterDuration": {
                                                            "durationUnit": "Days",
                                                            "durationValue": 0
                                                        }
                                                    }
                                                }
                                            }
                                        ]
                                    }
                                ],
                                "transportationDetails": {
                                    "shipMode": "LessThanTruckLoad",
                                    "transportationMode": "Road",
                                    "shippedDate": "2019-08-07T19:56:45.632",
                                    "estimatedDeliveryDate": "2019-08-07T19:56:45.632",           <---- here
                                    "shipmentDeliveryDate": "2019-08-07T19:56:45.632",           <---- here
                                    "carrierDetails": {
                                        "name": "UPS",
                                        "phone": "1234567890",
                                        "email": "abc@xyz.com",
                                        "code": "string",
                                        "shipmentReferenceNumber": "TRACK123123"
                                    },
                                    "billOfLadingNumber": "1234567890"
                                }
                            }
                        ]
                    }
                }
            }
        }
    }
]

My Environment

server: Linux version 4.14.268-205.500.amzn2.x86_64 JVM: java 1.8.0_202 swagger-codegen (maven-plugin):

<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>2.4.29</version>
GOODBOY008 commented 1 year ago

+1 , @sungolivia @rugved1991 Please take a look, If you are availble. Thank you~

github-actions[bot] commented 1 year ago

This is a very old issue that is probably not getting as much attention as it deserves. We encourage you to check if this is still an issue after the latest release and if you find that this is still a problem, please feel free to open a new issue and make a reference to this one.

github-actions[bot] commented 1 year ago

closed for inactivity