Amazon Selling Partner API (SP-API) SDK for TypeScript
    Preparing search index...
    • InvoicesApi - functional programming interface

      Parameters

      • Optionalconfiguration: Configuration

      Returns {
          createGovernmentInvoice(
              body: GovernmentInvoiceRequest,
              options?: RawAxiosRequestConfig,
          ): Promise<
              (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>,
          >;
          createInvoicesExport(
              body: ExportInvoicesRequest,
              options?: RawAxiosRequestConfig,
          ): Promise<
              (
                  axios?: AxiosInstance,
                  basePath?: string,
              ) => AxiosPromise<ExportInvoicesResponse>,
          >;
          getGovernmentInvoiceDocument(
              marketplaceId: string,
              transactionType: string,
              shipmentId: string,
              invoiceType: string,
              inboundPlanId?: string,
              fileFormat?: string,
              options?: RawAxiosRequestConfig,
          ): Promise<
              (
                  axios?: AxiosInstance,
                  basePath?: string,
              ) => AxiosPromise<GovtInvoiceDocumentResponse>,
          >;
          getGovernmentInvoiceStatus(
              marketplaceId: string,
              transactionType: string,
              shipmentId: string,
              invoiceType: string,
              inboundPlanId?: string,
              options?: RawAxiosRequestConfig,
          ): Promise<
              (
                  axios?: AxiosInstance,
                  basePath?: string,
              ) => AxiosPromise<GovernmentInvoiceStatusResponse>,
          >;
          getInvoice(
              marketplaceId: string,
              invoiceId: string,
              options?: RawAxiosRequestConfig,
          ): Promise<
              (
                  axios?: AxiosInstance,
                  basePath?: string,
              ) => AxiosPromise<GetInvoiceResponse>,
          >;
          getInvoices(
              marketplaceId: string,
              transactionIdentifierName?: string,
              pageSize?: number,
              dateEnd?: string,
              transactionType?: string,
              transactionIdentifierId?: string,
              dateStart?: string,
              series?: string,
              nextToken?: string,
              sortOrder?: GetInvoicesSortOrderEnum,
              invoiceType?: string,
              statuses?: string[],
              externalInvoiceId?: string,
              sortBy?: "START_DATE_TIME",
              options?: RawAxiosRequestConfig,
          ): Promise<
              (
                  axios?: AxiosInstance,
                  basePath?: string,
              ) => AxiosPromise<GetInvoicesResponse>,
          >;
          getInvoicesAttributes(
              marketplaceId: string,
              options?: RawAxiosRequestConfig,
          ): Promise<
              (
                  axios?: AxiosInstance,
                  basePath?: string,
              ) => AxiosPromise<GetInvoicesAttributesResponse>,
          >;
          getInvoicesDocument(
              invoicesDocumentId: string,
              options?: RawAxiosRequestConfig,
          ): Promise<
              (
                  axios?: AxiosInstance,
                  basePath?: string,
              ) => AxiosPromise<GetInvoicesDocumentResponse>,
          >;
          getInvoicesExport(
              exportId: string,
              options?: RawAxiosRequestConfig,
          ): Promise<
              (
                  axios?: AxiosInstance,
                  basePath?: string,
              ) => AxiosPromise<GetInvoicesExportResponse>,
          >;
          getInvoicesExports(
              marketplaceId: string,
              dateStart?: string,
              nextToken?: string,
              pageSize?: number,
              dateEnd?: string,
              status?: GetInvoicesExportsStatusEnum,
              options?: RawAxiosRequestConfig,
          ): Promise<
              (
                  axios?: AxiosInstance,
                  basePath?: string,
              ) => AxiosPromise<GetInvoicesExportsResponse>,
          >;
      }

      • createGovernmentInvoice: function
        • Submit an asynchronous request to create a government invoice.

          Parameters

          • body: GovernmentInvoiceRequest

            Information required to create the government invoice.

          • Optionaloptions: RawAxiosRequestConfig

            Override http request option.

          Returns Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>

      • createInvoicesExport: function
        • Creates an invoice export request.

          Parameters

          • body: ExportInvoicesRequest

            Information required to create the export request.

          • Optionaloptions: RawAxiosRequestConfig

            Override http request option.

          Returns Promise<
              (
                  axios?: AxiosInstance,
                  basePath?: string,
              ) => AxiosPromise<ExportInvoicesResponse>,
          >

      • getGovernmentInvoiceDocument: function
        • Retrieve the URL of an invoice document.

          Parameters

          • marketplaceId: string

            The marketplace of the invoice.

          • transactionType: string

            The marketplace-specific classification of the transaction type that originated the invoice. Check `transactionType` options using the `getInvoicesAttributes` operation.

          • shipmentId: string

            The unique shipment identifier for which to get an invoice.

          • invoiceType: string

            The marketplace-specific classification of the invoice type. Check `invoiceType` options using the `getInvoicesAttributes` operation.

          • OptionalinboundPlanId: string

            The unique inbound plan identifier in which the shipment is contained and for which the invoice will be created.

          • OptionalfileFormat: string

            The file format of the invoice. The default is XML.

          • Optionaloptions: RawAxiosRequestConfig

            Override http request option.

          Returns Promise<
              (
                  axios?: AxiosInstance,
                  basePath?: string,
              ) => AxiosPromise<GovtInvoiceDocumentResponse>,
          >

      • getGovernmentInvoiceStatus: function
        • Retrieve the status of an invoice generation request.

          Parameters

          • marketplaceId: string

            The marketplace of the invoice request.

          • transactionType: string

            The marketplace-specific classification of the transaction type that originated the invoice. Check `transactionType` options using the `getInvoicesAttributes` operation.

          • shipmentId: string

            The unique shipment identifier for which to get an invoice.

          • invoiceType: string

            The marketplace-specific classification of the invoice type. Check `invoiceType` options using the `getInvoicesAttributes` operation.

          • OptionalinboundPlanId: string

            The unique inbound plan identifier in which the shipment is contained and for which the invoice will be created.

          • Optionaloptions: RawAxiosRequestConfig

            Override http request option.

          Returns Promise<
              (
                  axios?: AxiosInstance,
                  basePath?: string,
              ) => AxiosPromise<GovernmentInvoiceStatusResponse>,
          >

      • getInvoice: function
        • Returns invoice data for the specified invoice. This operation returns only a subset of the invoices data; refer to the response definition to get all the possible attributes. To get the full invoice, use the createInvoicesExport operation to start an export request.

          Parameters

          • marketplaceId: string

            The marketplace from which you want the invoice.

          • invoiceId: string

            The invoice identifier.

          • Optionaloptions: RawAxiosRequestConfig

            Override http request option.

          Returns Promise<
              (
                  axios?: AxiosInstance,
                  basePath?: string,
              ) => AxiosPromise<GetInvoiceResponse>,
          >

      • getInvoices: function
        • Returns invoice details for the invoices that match the filters that you specify.

          Parameters

          • marketplaceId: string

            The response includes only the invoices that match the specified marketplace.

          • OptionaltransactionIdentifierName: string

            The name of the transaction identifier filter. If you provide a value for this field, you must also provide a value for the `transactionIdentifierId` field.Use the `getInvoicesAttributes` operation to check `transactionIdentifierName` options.

          • OptionalpageSize: number

            The maximum number of invoices you want to return in a single call. Minimum: 1 Maximum: 200

          • OptionaldateEnd: string

            The latest invoice creation date for invoices that you want to include in the response. Dates are in ISO 8601 date-time format. The default is the current date-time.

          • OptionaltransactionType: string

            The marketplace-specific classification of the transaction type for which the invoice was created. Use the `getInvoicesAttributes` operation to check `transactionType` options.

          • OptionaltransactionIdentifierId: string

            The ID of the transaction identifier filter. If you provide a value for this field, you must also provide a value for the `transactionIdentifierName` field.

          • OptionaldateStart: string

            The earliest invoice creation date for invoices that you want to include in the response. Dates are in ISO 8601 date-time format. The default is 24 hours prior to the time of the request.

          • Optionalseries: string

            Return invoices with the specified series number.

          • OptionalnextToken: string

            The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.

          • OptionalsortOrder: GetInvoicesSortOrderEnum

            Sort the invoices in the response in ascending or descending order.

          • OptionalinvoiceType: string

            The marketplace-specific classification of the invoice type. Use the `getInvoicesAttributes` operation to check `invoiceType` options.

          • Optionalstatuses: string[]

            A list of statuses that you can use to filter invoices. Use the `getInvoicesAttributes` operation to check invoice status options. Min count: 1

          • OptionalexternalInvoiceId: string

            Return invoices that match this external ID. This is typically the Government Invoice ID.

          • OptionalsortBy: "START_DATE_TIME"

            The attribute by which you want to sort the invoices in the response.

          • Optionaloptions: RawAxiosRequestConfig

            Override http request option.

          Returns Promise<
              (
                  axios?: AxiosInstance,
                  basePath?: string,
              ) => AxiosPromise<GetInvoicesResponse>,
          >

      • getInvoicesAttributes: function
        • Returns marketplace-dependent schemas and their respective set of possible values.

          Parameters

          • marketplaceId: string

            The marketplace identifier.

          • Optionaloptions: RawAxiosRequestConfig

            Override http request option.

          Returns Promise<
              (
                  axios?: AxiosInstance,
                  basePath?: string,
              ) => AxiosPromise<GetInvoicesAttributesResponse>,
          >

      • getInvoicesDocument: function
        • Returns the invoice document's ID and URL. Use the URL to download the ZIP file, which contains the invoices from the corresponding createInvoicesExport request.

          Parameters

          • invoicesDocumentId: string

            The export document identifier.

          • Optionaloptions: RawAxiosRequestConfig

            Override http request option.

          Returns Promise<
              (
                  axios?: AxiosInstance,
                  basePath?: string,
              ) => AxiosPromise<GetInvoicesDocumentResponse>,
          >

      • getInvoicesExport: function
        • Returns invoice export details (including the exportDocumentId, if available) for the export that you specify.

          Parameters

          • exportId: string

            The unique identifier for the export.

          • Optionaloptions: RawAxiosRequestConfig

            Override http request option.

          Returns Promise<
              (
                  axios?: AxiosInstance,
                  basePath?: string,
              ) => AxiosPromise<GetInvoicesExportResponse>,
          >

      • getInvoicesExports: function
        • Returns invoice exports details for exports that match the filters that you specify.

          Parameters

          • marketplaceId: string

            The returned exports match the specified marketplace.

          • OptionaldateStart: string

            The earliest export creation date and time for exports that you want to include in the response. Values are in ISO 8601 date-time format. The default is 30 days ago.

          • OptionalnextToken: string

            The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.

          • OptionalpageSize: number

            The maximum number of invoices to return in a single call. Minimum: 1 Maximum: 100

          • OptionaldateEnd: string

            The latest export creation date and time for exports that you want to include in the response. Values are in ISO 8601 date-time format. The default value is the time of the request.

          • Optionalstatus: GetInvoicesExportsStatusEnum

            Return exports matching the status specified.

          • Optionaloptions: RawAxiosRequestConfig

            Override http request option.

          Returns Promise<
              (
                  axios?: AxiosInstance,
                  basePath?: string,
              ) => AxiosPromise<GetInvoicesExportsResponse>,
          >