Amazon SP API
    Amazon SP API
    • Overview
    • Authorization Workflow
    • Permissions
    • Sandbox
    • API Models
    • Available API Models
    • Request Apidog Access
    • OPENAPI SPECIFICATION
    • Research Docs
      • Amazon Seller Order Fulfillment Workflow
    • Amazon Warehousing and Distribution
      • getInboundShipment
        GET
      • listInboundShipments
        GET
      • listInventory
        GET
    • Authorization
      • Authorization
        POST
    • Catalog Items
      • searchCatalogItems
        GET
      • getCatalogItem
        GET
    • Catalog [Deprecated]
      • listCatalogItems
        GET
      • getCatalogItem
        GET
      • listCatalogCategories
        GET
    • Definitions
      • searchDefinitionsProductTypes
        GET
      • getDefinitionsProductType
        GET
    • Easy Ship
      • listHandoverSlots
        POST
      • getScheduledPackage
        GET
      • createScheduledPackage
        POST
      • updateScheduledPackages
        PATCH
      • createScheduledPackageBulk
        POST
    • FBAInbound
      • listInboundPlans
      • createInboundPlan
      • getInboundPlan
      • listInboundPlanBoxes
      • cancelInboundPlan
      • listInboundPlanItems
      • updateInboundPlanName
      • listPackingGroupBoxes
      • listPackingGroupItems
      • setPackingInformation
      • listPackingOptions
      • generatePackingOptions
      • confirmPackingOption
      • listInboundPlanPallets
      • listPlacementOptions
      • generatePlacementOptions
      • confirmPlacementOption
      • getShipment
      • listShipmentBoxes
      • listShipmentContentUpdatePreviews
      • generateShipmentContentUpdatePreviews
      • getShipmentContentUpdatePreview
      • confirmShipmentContentUpdatePreview
      • getDeliveryChallanDocument
      • listDeliveryWindowOptions
      • generateDeliveryWindowOptions
      • confirmDeliveryWindowOptions
      • listShipmentItems
      • updateShipmentName
      • listShipmentPallets
      • cancelSelfShipAppointment
      • getSelfShipAppointmentSlots
      • generateSelfShipAppointmentSlots
      • scheduleSelfShipAppointment
      • updateShipmentSourceAddress
      • updateShipmentTrackingDetails
      • listTransportationOptions
      • generateTransportationOptions
      • confirmTransportationOptions
      • listItemComplianceDetails
      • updateItemComplianceDetails
      • createMarketplaceItemLabels
      • listPrepDetails
      • setPrepDetails
      • getInboundOperationStatus
      • getItemEligibilityPreview
    • FBAInventory
      • getInventorySummaries
      • createInventoryItem
      • deleteInventoryItem
      • addInventory
    • FBAOutbound
      • getFulfillmentPreview
      • deliveryOffers
      • listAllFulfillmentOrders
      • createFulfillmentOrder
      • getPackageTrackingDetails
      • listReturnReasonCodes
      • createFulfillmentReturn
      • getFulfillmentOrder
      • updateFulfillmentOrder
      • cancelFulfillmentOrder
      • submitFulfillmentOrderStatusUpdate
      • getFeatures
      • getFeatureInventory
      • getFeatureSKU
    • Feeds
      • getFeeds
      • createFeed
      • cancelFeed
      • getFeed
      • createFeedDocument
      • getFeedDocument
    • Fees
      • getMyFeesEstimateForSKU
      • getMyFeesEstimateForASIN
      • getMyFeesEstimates
    • Finance
      • listTransactions
      • listFinancialEventGroups
      • listFinancialEventsByGroupId
      • listFinancialEventsByOrderId
      • listFinancialEvents
    • Invoices [Brazil]
      • getInvoicesAttributes
      • getInvoicesDocument
      • createInvoicesExport
      • getInvoicesExports
      • getInvoicesExport
      • getInvoices
      • getInvoice
    • Listings Items
      • getListingsRestrictions
      • deleteListingsItem
      • getListingsItem
      • patchListingsItem
      • putListingsItem
    • Merchant Fulfillment
      • getEligibleShipmentServices
      • getShipment
      • cancelShipment
      • createShipment
      • getAdditionalSellerInputs
    • Orders
      • getOrders
      • getOrder
      • getOrderBuyerInfo
      • getOrderAddress
      • getOrderItems
      • getOrderItemsBuyerInfo
      • updateShipmentStatus
      • getOrderRegulatedInfo
      • updateVerificationStatus
      • confirmShipment
    • ProductPricing
      • deprecated
        • getPricing
        • getCompetitivePricing
        • getListingOffers
        • getItemOffers
        • getItemOffersBatch
        • getListingOffersBatch
      • getFeaturedOfferExpectedPriceBatch
      • getCompetitiveSummary
    • Reports
      • getReports
      • createReport
      • cancelReport
      • getReport
      • getReportSchedules
      • createReportSchedule
      • cancelReportSchedule
      • getReportSchedule
      • getReportDocument
    • Sales
      • getOrderMetrics
    • Sellers
      • getMarketplaceParticipations
      • getAccount
    • Service
      • getServiceJobByServiceJobId
      • cancelServiceJobByServiceJobId
      • completeServiceJobByServiceJobId
      • getServiceJobs
      • addAppointmentForServiceJobByServiceJobId
      • rescheduleAppointmentForServiceJobByServiceJobId
      • assignAppointmentResources
      • setAppointmentFulfillmentData
      • getRangeSlotCapacity
      • getFixedSlotCapacity
      • updateSchedule
      • createReservation
      • updateReservation
      • cancelReservation
      • getAppointmmentSlotsByJobId
      • getAppointmentSlots
      • createServiceDocumentUploadDestination
    • ShipmentInvoice[Brazil]
      • getShipmentDetails
      • submitInvoice
      • getInvoiceStatus
    • Shipping
      • getRates
      • createShipment
      • directPurchaseShipment
      • getShipment
      • purchaseShipment
      • cancelShipment
      • oneClickShipment
      • purchaseLabels
      • getTracking
      • retrieveShippingLabel
      • getShipmentDocuments
      • purchaseShipment
      • cancelShipment
      • getRates
      • getAdditionalInputs
      • getAccount
      • getCarrierAccountFormInputs
      • getTrackingInformation
      • getCarrierAccounts
      • linkCarrierAccount
      • unlinkCarrierAccount
      • generateCollectionForm
      • getCollectionFormHistory
      • getUnmanifestedShipments
      • getCollectionForm
      • getAccessPoints
    • Supply Sources
      • getSupplySources
      • createSupplySource
      • getSupplySource
      • updateSupplySource
      • archiveSupplySource
      • updateSupplySourceStatus
    • Tokens
      • createRestrictedDataToken
    • Uploads
      • createUploadDestinationForResource
    • Notifications
      • getSubscription
      • createSubscription
      • getSubscriptionById
      • deleteSubscriptionById
      • getDestinations
      • createDestination
      • getDestination
      • deleteDestination

    Permissions

    This document explains how to manage and request permissions for accessing Amazon Seller data using the SP-API. It provides a step-by-step guide for understanding and handling permissions, so your app can interact with seller accounts on their behalf.

    What are Permissions in SP-API?#

    Permissions in the context of Amazon SP-API define what data and actions your app can access for a seller account. When a seller connects your application to their account, they must grant specific permissions (scopes) that allow your app to perform actions like managing orders, retrieving inventory, and more.

    Types of Permissions (Scopes)#

    Amazon uses scopes to determine the level of access your app has to a seller's account. Each scope grants your app specific API permissions. Below are some common scopes:
    sellingpartnerapi::orders: Allows access to order-related data
    sellingpartnerapi::inventory: Grants access to manage and retrieve inventory data
    sellingpartnerapi::products: Allows access to product-related data
    sellingpartnerapi::reports: Grants access to generate and retrieve reports
    sellingpartnerapi::shipping: Allows access to manage shipping settings and fulfill orders
    sellingpartnerapi::finance: Access to financial data like invoices and settlements
    sellingpartnerapi::notifications: Allows your app to send notifications to the seller

    Step-by-Step Guide to Handling Permissions#

    Step 1: Define Required Scopes for Your App#

    Before requesting permissions from a seller, determine what your app needs to access. Choose the appropriate scopes for your app based on its functionality. For example:
    If your app manages orders and inventory, request sellingpartnerapi::orders and sellingpartnerapi::inventory
    Example Scopes:

    Step 2: Include Scopes in the Authorization URL#

    When you build the authorization URL to direct the seller to Amazon's login page, include the scope parameter, which specifies the permissions your app needs.
    Authorization URL:
    Parameters:
    application_id: Your app's ID (e.g., amzn1.sellerapps.app.123456)
    state: A unique, random string to protect against CSRF attacks
    redirect_uri: Your app's callback URI
    scope: A space-separated list of required permissions
    Example URL:

    Step 3: Seller Logs In and Grants Permissions#

    The seller will be redirected to the authorization page where they log in and grant your app the permissions you requested. They will see a list of scopes your app is requesting and have the option to approve or deny access.
    Once the seller grants access, Amazon redirects them to your redirect_uri with the following parameters:
    state: The same state string you sent
    code: The authorization code to exchange for tokens
    Example Redirect:

    Step 4: Handle Permissions in the Access Token Response#

    When you exchange the authorization code for access and refresh tokens, the response will contain information about the granted permissions. This lets you confirm that your app has the correct scopes for accessing the seller's data.
    Example Response:
    {
      "access_token": "Atza|IwEBL0B1...",
      "refresh_token": "Atzr|IwEBL0B1...",
      "token_type": "bearer",
      "expires_in": 3600,
      "scope": "sellingpartnerapi::orders sellingpartnerapi::inventory"
    }
    The scope field in the response shows which permissions have been granted.

    Step 5: Access Seller Data Based on Granted Permissions#

    Once you have the access token, you can start making SP-API requests. The seller's granted permissions will determine which endpoints you can access. For example:
    Access Orders: Use the sellingpartnerapi::orders scope to call the orders API
    Access Inventory: Use the sellingpartnerapi::inventory scope to retrieve inventory data
    Example API Request (Orders):

    Step 6: Handle Revoked Permissions#

    If the seller revokes your app's permissions (e.g., by disconnecting your app from their account), you will no longer be able to access the protected data. Your app should handle this scenario gracefully by checking the API's error responses and prompting the seller to reauthorize the app.
    Example Error (Unauthorized):
    {
      "errors": [
        {
          "message": "Unauthorized",
          "code": "Unauthorized",
          "details": "The access token has expired or been revoked."
        }
      ]
    }
    In such cases, prompt the seller to log in again and reauthorize the app.

    Best Practices for Handling Permissions#

    Request Minimal Scopes#

    Only request the permissions your app needs
    This improves security and reduces the risk of over-privileged access

    Handle Permission Revocations#

    Detect and handle cases where a seller revokes your app's permissions
    Check API responses and prompt the seller to reconnect when necessary

    Secure Token Storage#

    Store tokens and secrets securely using AWS Secrets Manager or encrypted databases

    Token Expiration Handling#

    Implement logic to refresh tokens when they expire or when permissions change

    Common Errors#

    Error CodeDescriptionSolution
    invalid_scopeThe requested scope is invalid or not availableCheck if the scope is correctly specified
    access_deniedSeller denied access to requested permissionsEnsure the seller grants the required permissions
    unauthorizedAccess token has expired or been revokedRefresh the token or prompt the seller to reauthorize
    Previous
    Authorization Workflow
    Next
    Sandbox
    Built with