Closed asongate closed 3 years ago
Hi,
I just wanted say this is a fantastic module. Thank you for this!
When includeDetails is set to false, order details are always returned when I call the getPurchaseOrders.
Here is my configuration.
import { VendorOrdersApiClient } from '@scaleleap/selling-partner-api-sdk'
const client = new VendorOrdersApiClient({ accessToken: 'Atza|.....',
// Or use amazonMarketplaces.CA.sellingPartner.region.endpoint // from @scaleleap/amazon-marketplaces package basePath: 'https://sandbox.sellingpartnerapi-na.amazon.com',
amazonMarketplaces.CA.sellingPartner.region.endpoint
@scaleleap/amazon-marketplaces
credentials: { accessKeyId: 'XXXXXX', secretAccessKey: 'XXXXXXX', },
// Or use amazonMarketplaces.CA.sellingPartner.region.awsRegion // from @scaleleap/amazon-marketplaces package region: 'us-east-1', })
amazonMarketplaces.CA.sellingPartner.region.awsRegion
const purchaseOrderOptions = { createdBefore: '2019-09-21T00:00:00', createdAfter: '2019-08-20T14:00:00', includeDetails: false, nextToken: 'MDAwMDAwMDAwMQ==', sortOrder: 'DESC' } const purchaseOrders = await client.getPurchaseOrders(purchaseOrderOptions); console.log(nextToken: ${purchaseOrders.data.payload.pagination.nextToken}); console.log(purchaseOrders.data.payload.orders);
nextToken: ${purchaseOrders.data.payload.pagination.nextToken}
According to the docs, I should be getting just the Purchase Order Numbers but the order details are included.
Thanks in advance.
Hi @asongate,
The package is generated from OpenAPI models provided by the SP API repo. We don't have any control over the functionality.
Please raise the issues with the SP API team.
Hi,
I just wanted say this is a fantastic module. Thank you for this!
When includeDetails is set to false, order details are always returned when I call the getPurchaseOrders.
Here is my configuration.
import { VendorOrdersApiClient } from '@scaleleap/selling-partner-api-sdk'
const client = new VendorOrdersApiClient({ accessToken: 'Atza|.....',
// Or use
amazonMarketplaces.CA.sellingPartner.region.endpoint
// from@scaleleap/amazon-marketplaces
package basePath: 'https://sandbox.sellingpartnerapi-na.amazon.com',credentials: { accessKeyId: 'XXXXXX', secretAccessKey: 'XXXXXXX', },
// Or use
amazonMarketplaces.CA.sellingPartner.region.awsRegion
// from@scaleleap/amazon-marketplaces
package region: 'us-east-1', })const purchaseOrderOptions = { createdBefore: '2019-09-21T00:00:00', createdAfter: '2019-08-20T14:00:00', includeDetails: false, nextToken: 'MDAwMDAwMDAwMQ==', sortOrder: 'DESC' } const purchaseOrders = await client.getPurchaseOrders(purchaseOrderOptions); console.log(
nextToken: ${purchaseOrders.data.payload.pagination.nextToken}
); console.log(purchaseOrders.data.payload.orders);According to the docs, I should be getting just the Purchase Order Numbers but the order details are included.
Thanks in advance.