Guía de casos de uso de la API de tokens
Usa el token de datos restringidos para acceder de forma segura a las API de los socios vendedores.
Versión de API: 01-03-01
¿Qué es la API de tokens?
The Selling Partner API for Tokens (Tokens API) provides a secure way to access a customer's Personally Identifiable Information (PII). You can call the createRestrictedDataToken
operation of the Tokens API to get a Restricted Data Token (RDT) for one or more restricted resources that you specify. Or, if you have a delegatee application, you can get an RDT from a delegator application owned by a developer that you work closely with (refer to Delegating authorization). In either case, an RDT authorizes you to make calls to operations that return restricted data. For definitions, refer to Terminology.
When you call a restricted operation, you include an RDT in the x-amz-access-token
header. This is in contrast to other Selling Partner API operations, where you include an LWA access token in the x-amz-access-token
header. For more information, refer to Step 3. Add headers to the URI.
Delegación de la autorización
With the Tokens API, a delegator application can get an RDT that delegates authorization to access PII to a delegatee application. The delegator application is authorized by the selling partner and is the application that the selling partner interacts with. The delegatee application performs a specialized function that requires PII, such as shipping, tax invoicing, or tax remittance services. These two applications are owned by different developers and are closely integrated, such that the delegator application can securely transmit an RDT to the delegatee application. For more information about delegating authorization using an RDT, refer to Tutorial: Delegate authorization to access PII.
Terminología
-
Token de datos restringidos (RDT). Un token de acceso de corta duración que autoriza las llamadas a operaciones restringidas. Un RDT mantiene su validez durante una hora.
-
Restricted operation. An operation that returns restricted data, such as PII. You need an RDT to call a restricted operation.
-
Recurso restringido. Un método y una ruta HTTP que representan una operación restringida.
-
Restricted report type. A report type that contains PII. Refer to Restricted report types.
-
Aplicación delegadora. Una aplicación que obtiene un RDT y lo transfiere a una aplicación delegada. El colaborador comercial autoriza a la aplicación delegadora e interactúa con ella.
-
Aplicación delegada. Aplicación que obtiene autorización para llamar a operaciones restringidas a partir de un RDT que recibe de una aplicación delegadora. Una aplicación delegada realiza una función especializada que requiere información de identificación personal, como los servicios de envío, facturación fiscal o remesa de impuestos, y no cuenta con la autorización directa del colaborador comercial.
-
Specific path. A path in a restricted resource that contains a specific order or shipment identifier. For example,
orders/v0/orders/902-3159896-1390916/address
. -
Generic path. A path in a restricted resource that contains a generic identifier, such as
{orderId}
or{shipmentId}
. For example,orders/v0/orders/{orderId}/address
.
Operaciones restringidas
Las operaciones restringidas devuelven la información de identificación personal (IIP) de los clientes. Necesitas un RDT para llamar a una operación restringida.
A continuación se muestra una lista de operaciones restringidas, agrupadas por API:
API de pedidos de gestión logística directa:
getOrders
getOrder
API de pedidos de cumplimiento directo v2021-12-28
getOrders
getOrder
API de envío de gestión logística directa:
getShippingLabel
getShippingLabels
getPackingSlip
getPackingSlips
getCustomerInvoice
getCustomerInvoices
createShippingLabels
API de envío con entrega directa v2021-12-28
getShippingLabel
getCustomerInvoices
getCustomerInvoice
getPackingSlips
getPackingSlip
API de envío fácil v2022-03-23
createScheduledPackageBulk
API de gestión del vendedor:
getShipment
cancelShipment
cancelShipmentOld
createShipment
API de pedidos:
getOrders
getOrder
getOrderItems
getOrderRegulatedInfo
getOrderAddress
getOrderBuyerInfo
getOrderItemsBuyerInfo
API de informes:
getReportDocument
Notas
- The
getReportDocument
operation is considered a restricted operation only when a restricted report type is specified. Refer to the list of restricted report types. - When calling the
createRestrictedDataToken
operation to get an RDT for thegetReportDocument
operation, the specified restricted resource can contain only a specific path, not a generic path. For definitions, refer to Terminology. - When using RDT to access the
getReportDocument
operation, make sure your application has the correct right roles to access the report. Refer to Roles in the Selling Partner API for roles to reports mapping.
Facturación de envíos:
getShipmentDetails
API de envío:
getShipment
Tipos de informes restringidos
Los tipos de informes restringidos contienen información de identificación personal. Al especificar un tipo de informe restringido en una llamada a la operación getReportDocument
, debes transferir un RDT con la llamada.
A continuación se muestra una lista de tipos de informes restringidos:
GET_AMAZON_FULFILLED_SHIPMENTS_DATA_INVOICING
GET_AMAZON_FULFILLED_SHIPMENTS_DATA_TAX
GET_FLAT_FILE_ACTIONABLE_ORDER_DATA_SHIPPING
GET_FLAT_FILE_ORDER_REPORT_DATA_SHIPPING
GET_FLAT_FILE_ORDER_REPORT_DATA_INVOICING
GET_FLAT_FILE_ORDER_REPORT_DATA_TAX
GET_FLAT_FILE_ORDERS_RECONCILIATION_DATA_TAX
GET_FLAT_FILE_ORDERS_RECONCILIATION_DATA_INVOICING
GET_FLAT_FILE_ORDERS_RECONCILIATION_DATA_SHIPPING
GET_ORDER_REPORT_DATA_INVOICING
GET_ORDER_REPORT_DATA_TAX
GET_ORDER_REPORT_DATA_SHIPPING
GET_EASYSHIP_DOCUMENTS
GET_GST_MTR_B2B_CUSTOM
GET_VAT_TRANSACTION_DATA
SC_VAT_TAX_REPORT
Tutorial: Obtenga autorización para acceder a tipos de informes restringidos con información de PII
-
The
getReportDocument
operation is considered a restricted operation only when a restricted report type is specified. Refer to the list of restricted report types. -
When calling the
createRestrictedDataToken
operation to get an RDT for thegetReportDocument
operation, the specified restricted resource can contain only a specific path, not a generic path. For definitions, refer to Terminology.
Requisitos
Para completar este tutorial, necesitarás:
-
Authorization from the selling partner for whom you are making calls. Refer to Authorizing Selling Partner API applications for more information.
-
Aprobación para las siguientes funciones:
- Envío directo al consumidor. Necesario para acceder a la información de la dirección de envío.
- Remesa de impuestos. Necesario para acceder a la información del comprador.
- Facturación fiscal. Necesario para acceder a la información del comprador.
To request access to these roles, refer to Registering as a developer and update your developer profile.
Paso 1. Obtener un RDT
- Call the
createRestrictedDataToken
operation, passing the following parameters:
Parámetro del cuerpo:
Parámetro | Descripción | Obligatorio |
---|---|---|
restrictedResources | A list of restricted resources. Note: Growth in the number of restricted resources results in growth in the size of the resulting restricted data token. The maximum size of the restricted data token before encoding and encryption cannot exceed 7kb without risk of failure when the token is employed. When requesting multiple resources, make sure that the resources requested are valid for the selling partner account type. For example, if requesting an RDT token for a seller, do not include vendor specific APIs in the createRestrictedDataToken request call. Type: < RestrictedResource > array |
Ejemplo de solicitud
POST https://sellingpartnerapi-na.amazon.com/tokens/2021-03-01/restrictedDataToken
{
"restrictedResources": [
{
"method": "GET",
"path": "/reports/2021-06-30/documents/amzn1.spdoc.1.4.eu.dca0cb77-4733-4769-8476-f09bc32be2af.T1KIM200NIMFNU.1234"
}
]
}
Respuesta
Una respuesta correcta incluye lo siguiente:
Nombre | Descripción |
---|---|
restrictedDataToken | Un token de datos restringidos (RDT). Se trata de un token de acceso de corta duración que autoriza las llamadas a operaciones restringidas. Pase este valor con el x-amz-access-token encabezado al realizar llamadas posteriores a estos recursos restringidos. El tamaño del RDT es relativo al número de recursos restringidos especificados en la solicitud. El tamaño máximo del token de datos restringidos antes de la codificación y el cifrado no puede superar los 7 KB sin riesgo de error cuando se utiliza el token. Tipo: cadena |
expiresIn | La vida útil del token de datos restringidos, en segundos. Tipo: entero |
Respuesta de ejemplo
{
"restrictedDataToken": "Atz.sprdt|IQEBLjAsAhRmHjNgHpi0U-Dme37rR6CuUpSR",
"expiresIn": 3600
}
- Guarde el
restrictedDataToken
valor (el RDT) para proporcionarlo en elgetReportDocument
operación.
Tutorial: Obtener autorización para acceder a la IIP para pedidos en bloque
You can get an RDT that provides authorization to access Personally Identifiable Information (PII) for bulk orders. The dataElements
values that you specify (using the restrictedResources
parameter of the createRestrictedDataToken
operation) determine the type of restricted data that the RDT authorizes your application to access. In this tutorial we request an RDT that authorizes access to both buyer information and shipping address information.
Requisitos
Para completar este tutorial, necesitarás:
-
Authorization from the selling partner for whom you are making calls. Refer to Authorizing Selling Partner API applications for more information.
-
Aprobación para las siguientes funciones:
- Envío directo al consumidor. Necesario para acceder a la información de la dirección de envío.
- Remesa de impuestos. Necesario para acceder a la información del comprador.
- Facturación fiscal. Necesario para acceder a la información del comprador.
To request access to these roles, refer to Registering as a developer and update your developer profile.
Paso 1. Obtener un RDT
Llama a la operación createRestrictedDataToken
para obtener un RDT.
- Call the
createRestrictedDataToken
operation, passing the following parameters:
Parámetro del cuerpo:
Parámetro | Descripción | Obligatorio |
---|---|---|
restrictedResources
|
Una lista de recursos restringidos. Nota:
Type: < |
Sí |
Ejemplo de solicitud
POST https://sellingpartnerapi-na.amazon.com/tokens/2021-03-01/restrictedDataToken
{
"restrictedResources": [
{
"method": "GET",
"path": "/orders/v0/orders",
"dataElements": ["buyerInfo", "shippingAddress"]
}
]
}
Respuesta
Una respuesta correcta incluye lo siguiente:
Nombre | Descripción |
---|---|
restrictedDataToken
|
Un token de datos restringidos (RDT). Se trata de un token de acceso de corta duración que autoriza las llamadas a operaciones restringidas. Utiliza este valor con el encabezado El tamaño del RDT es relativo al número de recursos restringidos especificados en la solicitud. El tamaño máximo del token de datos restringidos antes de la codificación y el cifrado no puede superar los 7 kb sin riesgo de error cuando se utiliza el token. Tipo: cadena |
expiresIn
|
La vida útil del RDT, en segundos. Tipo: entero |
Ejemplo de respuesta
{
"restrictedDataToken": "Atz.sprdt|IQEBLjAsAhRmHjNgHpi0U-Dme37rR6CuUpSR",
"expiresIn": 3600
}
- Save the
restrictedDataToken
value (the RDT) to use in Step 2. Include the RDT with a call to thegetOrders
operation
Paso 2. Incluir el RDT con una llamada a la operación getOrders
getOrders
Call the getOrders
operation of the Orders API, specifying the appropriate parameters to filter for the orders that you want. Be sure to include the RDT from Step 1. Get an RDT in the x-amz-access-token
header of your call to getOrders
. Because you specified both buyerInfo
and shippingAddress
in Step 1. Get an RDT, your call to getOrders
is authorized to return both buyer information and shipping address information for each order. Had you specified only buyerInfo
in Step 1, getOrders
would be authorized to return only buyer information for each order. Had you specified only shippingAddress
in Step 1, getOrders
would be authorized to return only shipping address information for each order.
Tutorial: Obtener autorización para acceder a la IIP de los artículos del pedido
Puedes obtener un RDT que autorice el acceso a información de identificación personal (IIP) de los artículos del pedido en un orden específico. En este proceso, especificas dataElements
=buyerInfo
para indicar que el RDT autorizará a tu aplicación a acceder a la información del comprador de los artículos del pedido.
Requisitos
Para completar este tutorial, necesitarás:
-
Authorization from the selling partner for whom you are making calls. Refer to Authorizing Selling Partner API applications for more information.
-
Aprobación para las siguientes funciones:
- Remesa de impuestos
- Facturación fiscal
Depending on your use case, you might need approval for only one of these roles. To learn more about roles and request access, refer to Registering as a developer and update your developer profile.
Paso 1. Obtener un ID de pedido
Necesitas un ID de pedido para identificar un pedido del que deseas obtener información sobre el artículo del pedido. También necesitas un ID de pedido para obtener un RDT que autorice a tu aplicación a acceder a la información del comprador de los artículos del pedido. Puedes usar la operación getOrders
de la API de pedidos para obtener una lista de pedidos, desde la que puedes obtener el ID del pedido que te interesa.
-
Call the
getOrders
operation of the Orders API, specifying the appropriate parameters to filter for the order that you want.La operación devuelve los pedidos que coinciden con tu solicitud. Cada pedido incluye un ID de pedido.
-
De los pedidos devueltos, identifica el pedido del que deseas obtener información sobre el artículo del pedido.
-
Save the order ID for the order that you want, to use in Step 2. Get an RDT and Step 3. Include the RDT with a call to the
getOrderItems
operation.
Paso 2. Obtener un RDT
Call the createRestrictedDataToken
operation to get an RDT. In the path
property of the restrictedResources
parameter, include the order ID from Step 1. Get an order ID. In this workflow we will specify the buyerInfo
value of the dataElements
parameter. This indicates that the RDT should provide authorization to access PII for use cases such as tax and gift wrapping.
Llama a la operación createRestrictedDataToken
para obtener un RDT.
- Call the
createRestrictedDataToken
operation, passing the following parameter:
Parámetro del cuerpo:
Parámetro | Descripción | Obligatorio |
---|---|---|
restrictedResources
|
Una lista de recursos restringidos. Nota:
Type: < |
Sí |
Ejemplo de solicitud
POST https://sellingpartnerapi-na.amazon.com/tokens/2021-03-01/restrictedDataToken
{
"restrictedResources": [
{
"method": "GET",
"path": "/orders/v0/orders/123-1234567-1234567/orderItems",
"dataElements": ["buyerInfo"]
}
]
}
Respuesta
Una respuesta correcta incluye lo siguiente:
Nombre | Descripción |
---|---|
restrictedDataToken
|
Un token de datos restringidos (RDT). Se trata de un token de acceso de corta duración que autoriza las llamadas a operaciones restringidas. Utiliza este valor con el encabezado El tamaño del RDT es relativo al número de recursos restringidos especificados en la solicitud. El tamaño máximo del token de datos restringidos antes de la codificación y el cifrado no puede superar los 7 kb sin riesgo de error cuando se utiliza el token. Tipo: cadena |
expiresIn
|
La vida útil del RDT, en segundos. Tipo: entero |
Ejemplo de respuesta
{
"restrictedDataToken": "Atz.sprdt|IQEBLjAsAhRmHjNgHpi0U-Dme37rR6CuUpSR",
"expiresIn": 3600
}
- Save the
restrictedDataToken
value (the RDT) to use in Step 3. Include the RDT with a call thegetOrder
operation.
Paso 3. Incluir el RDT con una llamada a la operación getOrderItems
getOrderItems
Call the getOrderItems
operation of the Orders API, specifying the order ID that you identified in Step 1. Get an order ID. Be sure to include the RDT from Step 1 in the x-amz-access-token
header of your call to getOrderItems
.
Tutorial: Delegar la autorización para acceder a la IIP
Puedes delegar la autorización para llamar a operaciones restringidas a una "aplicación delegada", que es una aplicación que realiza una función especializada para un colaborador comercial (como los servicios de envío, facturación fiscal o remesa de impuestos), pero que no cuenta con la autorización directa de este. De esta forma, puedes delegar la autorización si
- Calling the
createRestrictedDataToken
operation of the Tokens API (specifying the application ID of the delegatee application), - Obtienes un RDT de la respuesta
createRestrictedDataToken
y - Transfieres el RDT a la aplicación delegada.
The RDT authorizes the delegatee application to call restricted operations that return the PII required to perform functions on behalf of the selling partner. For definitions, refer to Terminology.
Requisitos
Para completar este tutorial, necesitarás:
-
Authorization from the selling partner for whom you are making calls. Refer to Authorizing Selling Partner API applications for more information.
-
To have indicated in the App registration form that you want to delegate access to PII to another application. For instructions for updating the App registration form, refer to Registering your application. Indicate in the form the types of PII that you want to delegate.
-
El ID de pedido de un pedido que requiere la funcionalidad de envío o impuestos.
-
Una asociación con un desarrollador con una aplicación delegada.
-
El ID de la aplicación delegada.
-
Un medio seguro para transmitir un RDT y un ID de pedido a una aplicación delegada.
In addition, the developer with the delegatee application in Step 3. The delegatee application calls the getOrder
operation will need to:
-
Register as a developer, requesting approval for the roles that are required to access buyer information and shipping address information. These are:
- Envío directo al consumidor. Necesario para acceder a la información de la dirección de envío.
- Remesa de impuestos. Necesario para acceder a la información del comprador.
- Facturación fiscal. Necesario para acceder a la información del comprador.
For more information about roles, refer to Roles in the Selling Partner API.
Paso 1. Obtener un RDT
Llama a la operación createRestrictedDataToken
para obtener un RDT. En la propiedad path
del parámetro restrictedResources
, incluye el ID de pedido del pedido para el que se requiere información de identificación personal (IIP). En este proceso especificaremos los valores de buyerInfo
y shippingAddress
del parámetro dataElements
. Esto indica que el RDT debe incluir la autorización para acceder a la IIP en casos de uso como los impuestos y el envío. En tu propio proceso, puedes especificar solo un valor, en función de la IIP que requiera tu caso de uso.
- Call the
createRestrictedDataToken
operation, passing the following parameters:
Parámetros del cuerpo:
Parámetro | Descripción | Obligatorio |
---|---|---|
restrictedResources
|
Una lista de recursos restringidos. Nota:
Type: < |
Sí |
targetApplication
|
El ID de la aplicación de destino a la que se delega el acceso. Tipo: cadena |
No |
Ejemplo de solicitud
POST https://sellingpartnerapi-na.amazon.com/tokens/2021-03-01/restrictedDataToken
{
"restrictedResources": [
{
"method": "GET",
"path": "/orders/v0/orders/123-1234567-1234567",
"dataElements": ["buyerInfo", "shippingAddress"]
}
],
"targetApplication": "amzn1.sellerapps.app.target-application"
}
Respuesta
Una respuesta correcta incluye lo siguiente:
Nombre | Descripción |
---|---|
restrictedDataToken
|
Un token de datos restringidos (RDT). Se trata de un token de acceso de corta duración que autoriza las llamadas a operaciones restringidas. Utiliza este valor con el encabezado El tamaño del RDT es relativo al número de recursos restringidos especificados en la solicitud. El tamaño máximo del token de datos restringidos antes de la codificación y el cifrado no puede superar los 7 kb sin riesgo de error cuando se utiliza el token. Tipo: cadena |
expiresIn
|
La vida útil del RDT, en segundos. Tipo: entero |
Ejemplo de respuesta
{
"restrictedDataToken": "Atz.sprdt|IQEBLjAsAhRmHjNgHpi0U-Dme37rR6CuUpSR",
"expiresIn": 3600
}
- Guarda el valor de
restrictedDataToken
(el RDT) para proporcionárselo a la aplicación delegada en el siguiente paso.
Paso 2. Transferir el RDT y el ID del pedido a la aplicación delegada
Transmite de forma segura el RDT y el ID del pedido a la aplicación delegada. La aplicación los utilizará al llamar a la operación getOrder
en el siguiente paso.
Paso 3. La aplicación delegada llama a la operación getOrder
getOrder
The delegatee application calls the getOrder
operation of the Orders API, specifying in the path the order ID from Step 2. Pass the RDT and order ID to the delegatee application. The call must include the RDT (also from Step 2) in the x-amz-access-token
header of the call. Because both buyerInfo
and shippingAddress
were specified in Step 1. Get an RDT, the call to getOrder
returns both buyer information and shipping address information for the order.
- The delegatee application calls the
getOrder
operation, passing the following parameters:
Parámetros del cuerpo:
Parámetro | Descripción | Obligatorio |
---|---|---|
orderId
|
Un identificador de pedido definido por Amazon, en formato 3-7-7. Tipo: cadena |
Sí |
Ejemplo de solicitud
GET https://sellingpartnerapi-na.amazon.com/orders/v0/orders/123-1234567-1234567
Respuesta
Una respuesta correcta incluye lo siguiente:
Nombre | Descripción |
---|---|
payload
|
La carga útil de la operación Type: Order |
Ejemplo de respuesta
{
"payload": {
"AmazonOrderId": "902-3159896-1390916",
"PurchaseDate": "2017-01-20T19:49:35Z",
"LastUpdateDate": "2017-01-20T19:49:35Z",
"OrderStatus": "Pending",
"FulfillmentChannel": "SellerFulfilled",
"NumberOfItemsShipped": 0,
"NumberOfItemsUnshipped": 0,
"PaymentMethod": "Other",
"PaymentMethodDetails": [
"CreditCard",
"GiftCerificate"
],
"MarketplaceId": "ATVPDKIKX0DER",
"ShipmentServiceLevelCategory": "Standard",
"OrderType": "StandardOrder",
"EarliestShipDate": "2017-01-20T19:51:16Z",
"LatestShipDate": "2017-01-25T19:49:35Z",
"IsBusinessOrder": false,
"IsPrime": false,
"IsGlobalExpressEnabled": false,
"IsPremiumOrder": false,
"IsSoldByAB": false,
"DefaultShipFromLocationAddress": {
"Name": "MFNIntegrationTestMerchant",
"AddressLine1": "2201 WESTLAKE AVE",
"City": "SEATTLE",
"StateOrRegion": "WA",
"PostalCode": "98121-2778",
"CountryCode": "US",
"Phone": "+1 480-386-0930 ext. 73824",
"AddressType": "Commercial"
},
"FulfillmentInstruction": {
"FulfillmentSupplySourceId": "sampleSupplySourceId"
},
"IsISPU": false,
"ShippingAddress": {
"Name": "Michigan address",
"AddressLine1": "1 Cross St.",
"City": "Canton",
"StateOrRegion": "MI",
"PostalCode": "48817",
"CountryCode": "US"
},
"BuyerInfo": {
"BuyerEmail": "user@example.com",
"BuyerName": "John Doe",
"BuyerTaxInfo": {
"CompanyLegalName": "A Company Name"
},
"PurchaseOrderNumber": "1234567890123"
}
}
}
- La aplicación delegada utiliza los datos de la respuesta para realizar sus funciones de envío e impuestos.
Tutorial: Obtener autorización para acceder a la información de envío de varios envíos
Puedes obtener un RDT que proporcione autorización para obtener la información de envío de cualquiera de los envíos de un colaborador comercial.
Requisitos
Para completar este tutorial, necesitarás:
-
Authorization from the selling partner for whom you are making calls. Refer to Authorizing Selling Partner API applications for more information.
-
Approval for the Direct-to-consumer shipping role, which is required to access shipping address information. To request access to this role, refer to Registering as a developer and update your developer profile.
-
ID de envío de los envíos de los que quieres obtener información de envío.
Paso 1. Obtener un RDT
Call the createRestrictedDataToken
operation to get an RDT. In the path
property of the restrictedResources
parameter that you specify, use a generic path that includes this text: {shipmentId}
. For definitions, refer to Terminology.
- Call the
createRestrictedDataToken
operation, passing the following parameter:
Parámetros del cuerpo:
Parámetro | Descripción | Obligatorio |
---|---|---|
restrictedResources
|
Una lista de recursos restringidos. Nota:
Type: < |
Sí |
Ejemplo de solicitud
POST https://sellingpartnerapi-na.amazon.com/tokens/2021-03-01/restrictedDataToken
{
"restrictedResources": [
{
"method": "GET",
"path": "/mfn/v0/shipments/{shipmentId}"
}
]
}
Respuesta
Una respuesta correcta incluye lo siguiente:
Nombre | Descripción |
---|---|
restrictedDataToken
|
Un token de datos restringidos (RDT). Se trata de un token de acceso de corta duración que autoriza las llamadas a operaciones restringidas. Utiliza este valor con el encabezado El tamaño del RDT es relativo al número de recursos restringidos especificados en la solicitud. El tamaño máximo del token de datos restringidos antes de la codificación y el cifrado no puede superar los 7 kb sin riesgo de error cuando se utiliza el token. Tipo: cadena |
expiresIn
|
La vida útil del RDT, en segundos. Tipo: entero |
Ejemplo de respuesta
{
"restrictedDataToken": "Atz.sprdt|IQEBLjAsAhRmHjNgHpi0U-Dme37rR6CuUpSR",
"expiresIn": 3600
}
-
Save the
restrictedDataToken
value (the RDT) to use in Step 2. Include the RDT with a call thegetShipment
operation.For definitions, refer to Terminology.
Paso 2. Incluir el RDT con una llamada a la operación getShipment
getShipment
Call the getShipment
operation of the Merchant Fulfillment API, using the generic path that you specified in Step 1. Get an RDT and replacing {shipmentId}
with a real shipment ID from the selling partner. For example, GET /mfn/v0/shipments/FBA1234ABC5D
. Repeat this step for all of the shipments for which you want shipping information, specifying the appropriate shipment ID with each call. Each call must include the RDT from Step 1. Get an RDT in the x-amz-access-token
header.
Nota
An RDT remains valid for one hour.
Tutorial: Generar un SDK para la API de Tokens
Puedes encontrar los pasos que describen cómo generar un SDK para la API Tokens en Java o C# en la siguiente página:
- Genere un SDK de Java con el intercambio de tokens LWA
- Generar un SDK de C# con generación y autenticación de tokens de LWA
If you're using the Java SDK, you should also:
-
Corre
mvn package
dentro de la carpeta SDK generada. -
Download any of the following files and use them to build classes inside the
main/java/sampleCode/
folder of the generated client library. For definitions, refer to Terminology.- RestrictedDataTokenWorkflow.java. For getting an RDT and using it to authorize your own application to call one or more restricted operations.
- DelegatedRestrictedDataTokenWorkflowForDelegator.java. For getting an RDT that delegates authorization to call restricted operations to a delegatee application.
- DelegatedRestrictedDataTokenWorkflowForDelegatee.java. For a delegatee application that receives an RDT from a delegator application and uses it for authorization to call restricted operations.
Usa la versión más reciente de la API de Tokens
Use the latest version of
tokens_2021-03-01.json
when generating your SDK to ensure that you are getting the latest functionality.
Updated 6 months ago