ahmet
ahmet

Reputation: 1

Amazon SP-API price and stock update issue

 `   let response;
    let submissionId;

    const replaceBodyData = {
      productType : productType,
      patches: [
        {
          op: 'replace',
          path: '/attributes/purchasable_offer',
          value: [{
            marketplace_id: MARKETPLACE_ID,
              currency: 'TRY',
            purchasable_offer: [{
           "our_price": [
      {"schedule": [{"value_with_tax": price}]}
                ],
            }],
          }]
        },
        {
          op: 'replace',
          operation_type: 'PARTIAL_UPDATE',
          path: '/attributes/fulfillment_availability',
          value: [{
            fulfillment_channel_code: 'DEFAULT',
            quantity: String(quantity),
            marketplace_id: MARKETPLACE_ID,
          }]
        },
      ]
    };`
`[DEBUG] getListingsItem SUCCESS yan─▒t─▒: {
  "sku": "AE H66F",
  "summaries": [
    {
      "marketplaceId": "A33AVAJ2PDY3EV",
      "asin": "B09JKYXFSJ",
      "productType": "ELECTRONIC_COMPONENT_FAN",
      "conditionType": "new_new",
      "status": [
        "BUYABLE",
        "DISCOVERABLE"
      ],
      "itemName": "Aerocool H66F fan kontrol├╝",
      "createdDate": "2024-12-26T09:52:53.053Z",
      "lastUpdatedDate": "2024-12-26T09:52:53.053Z",
      "mainImage": {
        "link": "https://m.media-amazon.com/images/I/31+Y302QIAL.jpg",
        "height": 500,
        "width": 500
      }
    }
  ]
}
[DEBUG] getListingsItem => productType: ELECTRONIC_COMPONENT_FAN
[DEBUG] patchListingsItem REPLACE => {
  "productType": "ELECTRONIC_COMPONENT_FAN",
  "patches": [
    {
      "op": "replace",
      "path": "/attributes/purchasable_offer",
      "value": [
        {
          "marketplace_id": "A33AVAJ2PDY3EV",
          "currency": "TRY",
          "purchasable_offer": [
            {
              "our_price": [
                {
                  "schedule": [
                    {
                      "value_with_tax": "668.00"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "op": "replace",
      "operation_type": "PARTIAL_UPDATE",
      "path": "/attributes/fulfillment_availability",
      "value": [
        {
          "fulfillment_channel_code": "DEFAULT",
          "quantity": "36",
          "marketplace_id": "A33AVAJ2PDY3EV"
        }
      ]
    }
  ]
}
[DEBUG] REPLACE Yan─▒t => {
  "sku": "AE H66F",
  "status": "ACCEPTED",
  "submissionId": "79bdf335dfa54035bac8e9b8f01c62e3",
  "issues": []
}
[DEBUG] Fiyat g├╝ncelleme iste─şi g├Ânderildi. Submission ID: 79bdf335dfa54035bac8e9b8f01c62e3
[DEBUG] API Yan─▒t─▒: {
  "sku": "AE H66F",
  "status": "ACCEPTED",
  "submissionId": "79bdf335dfa54035bac8e9b8f01c62e3",
  "issues": []
}`

I am working on an Electron-Vue project and using Amazon SP-API to update both stock and price for products. I’m sending the request to the SP-API using the op: 'replace' operation. While stock updates successfully, the price does not update.

The returned response indicates everything is fine, but the price data is not updating when I check in Seller Central. If anyone knows the solution, please help.

Upvotes: 0

Views: 63

Answers (0)

Related Questions