API Reference

Destination Oluşturma

Bildirimleri almak amacıyla destination oluşturmaya yarayan servistir.

Servisin uzantısı : POST /notifications/v1/destination

  • Saniyede 1 istek atabilirsiniz.
  • Payload version & destinationId zorunludur. Bildirimleri özelleştirmek için optional olan processingDirective objesini gönderebilirsiniz.
    • Bu özellik şu anda sadece ANY_OFFER_CHANGE & ORDER_CHANGE bildirim türlerinde yer almaktadır.
  • Bu servis, grantless bir operasyondur. Bundan dolayı grantless token kullanmanız gerekmektedir. Grantless Token için bakabilirsiniz.

curl --location 'https://sellingpartnerapi-eu.amazon.com/notifications/v1/destinations' \
--header 'x-amz-access-token: {{grantless_token}}' \
--header 'Content-Type: application/json' \
--data '{
  "resourceSpecification":
  {
    "sqs":
    {
      "arn": "arn:aws:sqs:eu-west-1:4613989******:xxxxxx"
    }
  },
  "name": "xxxxxxx"
}
'
{
    "payload": {
        "resource": {
            "sqs": {
                "arn": "arn:aws:sqs:eu-west-1:461398*****:xxxx"
            },
            "eventBridge": null,
            "privateSqs": null
        },
        "destinationId": "cfb342a6-2ce6-421a-aa8a-*********",
        "name": "xxxxxxx"
    }
}
curl --location 'https://sellingpartnerapi-eu.amazon.com/notifications/v1/destinations' \
--header 'x-amz-access-token: {{grantless_token}}' \
--header 'Content-Type: application/json' \
--data '{
  "resourceSpecification":
  {
    "eventBridge":
    {
      "accountId": "461398*****",
      "region": "eu-west-1"
    }
  },
  "name": "xxxxxtestx"
}
'
{
    "payload": {
        "resource": {
            "sqs": null,
            "eventBridge": {
                "name": "aws.partner/sellingpartnerapi.amazon.com/4613989***/amzn1.sp.solution.8591b031-e6aa-4841-bf1a-******",
                "accountId": "4613989*****",
                "region": "eu-west-1"
            },
            "privateSqs": null
        },
        "destinationId": "b2c14679-6c93-44ac-aca9-*******",
        "name": "xxxxxxxtestx"
    }
}
{
    "errors": [
        {
            "code": "Unauthorized",
            "message": "Access to requested resource is denied.",
            "details": "The access token you provided has expired."
        }
    ]
}