Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Create and Update Offers Using JSON_LISTINGS_FEED #834

Open
impromani opened this issue Dec 20, 2024 · 0 comments
Open

How to Create and Update Offers Using JSON_LISTINGS_FEED #834

impromani opened this issue Dec 20, 2024 · 0 comments

Comments

@impromani
Copy link

impromani commented Dec 20, 2024

I am currently using the POST_FLAT_FILE_INVLOADER_DATA feed to submit data. This feed performs both actions—creating a new SKU if it doesn't exist and updating the SKU if it already exists.

I am planning to migrate from the POST_FLAT_FILE_INVLOADER_DATA feed to JSON_LISTINGS_FEED. However, after reviewing the documentation (linked below), I found that the provided examples only demonstrate how to update existing SKUs:
Listing Workflow Migration Tutorial.

{
 "operationType": "PATCH",
  "productType": "PRODUCT",
  "patches": [
    {
      "op": "replace",
      "path": "/attributes/purchasable_offer",
      "value": [
        {
          "currency": "USD",
          "our_price": [
            {
              "schedule": [
                {
                  "value_with_tax": 90.00
                }
              ]
            }
          ],
          "minimum_seller_allowed_price": [
            {
              "schedule": [
                {
                  "value_with_tax": 80.00
                }
              ]
            }
          ],
          "maximum_seller_allowed_price": [
            {
              "schedule": [
                {
                  "value_with_tax": 100.00
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "op": "replace",
      "path": "/attributes/fulfillment_availability",
      "value": [
        {
          "fulfillment_channel_code": "DEFAULT",
          "quantity": 5,
          "lead_time_to_ship_max_days": 1
        }
      ]
    }
    ... (more patches, if applicable)
  ]
}

I attempted to use the JSON_LISTINGS_FEED for this purpose, but it only updates existing SKUs and does not create new ones.

Could you please suggest a way to achieve both actions (create and update) in a single API call, similar to how it works with the previous feed?

Below are the feed attributes I am currently using with POST_FLAT_FILE_INVLOADER_DATA:

  • sku
  • price
  • minimum-seller-allowed-price
  • maximum-seller-allowed-price
  • quantity
  • product-id
  • product-id-type
  • item-condition
  • item-note

Any guidance would be greatly appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant