AWS Invoicing

2026/05/22 - AWS Invoicing - 6 updated api methods

Changes  Adds support for idempotency with a new ClientToken field for the CreateInvoiceUnit, DeleteInvoiceUnit, UpdateInvoiceUnit, DeleteProcurementPortalPreference, PutProcurementPortalPreference, and UpdateProcurementPortalPreferenceStatus APIs.

CreateInvoiceUnit (updated) Link ¶
Changes (request)
{'ClientToken': 'string'}

This creates a new invoice unit with the provided definition.

See also: AWS API Documentation

Request Syntax

client.create_invoice_unit(
    Name='string',
    InvoiceReceiver='string',
    Description='string',
    TaxInheritanceDisabled=True|False,
    Rule={
        'LinkedAccounts': [
            'string',
        ],
        'BillSourceAccounts': [
            'string',
        ]
    },
    ResourceTags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    ClientToken='string'
)
type Name:

string

param Name:

[REQUIRED]

The unique name of the invoice unit that is shown on the generated invoice. This can't be changed once it is set. To change this name, you must delete the invoice unit recreate.

type InvoiceReceiver:

string

param InvoiceReceiver:

[REQUIRED]

The Amazon Web Services account ID chosen to be the receiver of an invoice unit. All invoices generated for that invoice unit will be sent to this account ID.

type Description:

string

param Description:

The invoice unit's description. This can be changed at a later time.

type TaxInheritanceDisabled:

boolean

param TaxInheritanceDisabled:

Whether the invoice unit based tax inheritance is/ should be enabled or disabled.

type Rule:

dict

param Rule:

[REQUIRED]

The InvoiceUnitRule object used to create invoice units.

  • LinkedAccounts (list) --

    The list of LINKED_ACCOUNT IDs where charges are included within the invoice unit.

    • (string) --

  • BillSourceAccounts (list) --

    A list of Amazon Web Services account IDs that have delegated their billing responsibility to the receiver account through transfer billing. Unlike linked accounts, these bill source accounts can be payer accounts from other organizations that have authorized billing transfer to this account.

    • (string) --

type ResourceTags:

list

param ResourceTags:

The tag structure that contains a tag key and value.

  • (dict) --

    The tag structure that contains a tag key and value.

    • Key (string) -- [REQUIRED]

      The object key of your of your resource tag.

    • Value (string) -- [REQUIRED]

      The specific value of the resource tag.

type ClientToken:

string

param ClientToken:

A unique, case-sensitive identifier that you provide to ensure idempotency of the request.

This field is autopopulated if not provided.

rtype:

dict

returns:

Response Syntax

{
    'InvoiceUnitArn': 'string'
}

Response Structure

  • (dict) --

    • InvoiceUnitArn (string) --

      The ARN to identify an invoice unit. This information can't be modified or deleted.

DeleteInvoiceUnit (updated) Link ¶
Changes (request)
{'ClientToken': 'string'}

This deletes an invoice unit with the provided invoice unit ARN.

See also: AWS API Documentation

Request Syntax

client.delete_invoice_unit(
    InvoiceUnitArn='string',
    ClientToken='string'
)
type InvoiceUnitArn:

string

param InvoiceUnitArn:

[REQUIRED]

The ARN to identify an invoice unit. This information can't be modified or deleted.

type ClientToken:

string

param ClientToken:

A unique, case-sensitive identifier that you provide to ensure idempotency of the request.

This field is autopopulated if not provided.

rtype:

dict

returns:

Response Syntax

{
    'InvoiceUnitArn': 'string'
}

Response Structure

  • (dict) --

    • InvoiceUnitArn (string) --

      The ARN to identify an invoice unit. This information can't be modified or deleted.

DeleteProcurementPortalPreference (updated) Link ¶
Changes (request)
{'ClientToken': 'string'}

This feature API is subject to changing at any time. For more information, see the Amazon Web Services Service Terms (Betas and Previews).

Deletes an existing procurement portal preference. This action cannot be undone. Active e-invoice delivery and PO retrieval configurations will be terminated.

See also: AWS API Documentation

Request Syntax

client.delete_procurement_portal_preference(
    ProcurementPortalPreferenceArn='string',
    ClientToken='string'
)
type ProcurementPortalPreferenceArn:

string

param ProcurementPortalPreferenceArn:

[REQUIRED]

The Amazon Resource Name (ARN) of the procurement portal preference to delete.

type ClientToken:

string

param ClientToken:

A unique, case-sensitive identifier that you provide to ensure idempotency of the request.

This field is autopopulated if not provided.

rtype:

dict

returns:

Response Syntax

{
    'ProcurementPortalPreferenceArn': 'string'
}

Response Structure

  • (dict) --

    • ProcurementPortalPreferenceArn (string) --

      The Amazon Resource Name (ARN) of the deleted procurement portal preference.

PutProcurementPortalPreference (updated) Link ¶
Changes (request)
{'ClientToken': 'string'}

This feature API is subject to changing at any time. For more information, see the Amazon Web Services Service Terms (Betas and Previews).

Updates an existing procurement portal preference configuration. This operation can modify settings for e-invoice delivery and purchase order retrieval.

See also: AWS API Documentation

Request Syntax

client.put_procurement_portal_preference(
    ProcurementPortalPreferenceArn='string',
    Selector={
        'InvoiceUnitArns': [
            'string',
        ],
        'SellerOfRecords': [
            'string',
        ]
    },
    ProcurementPortalSharedSecret='string',
    ProcurementPortalInstanceEndpoint='string',
    TestEnvPreference={
        'BuyerDomain': 'NetworkID',
        'BuyerIdentifier': 'string',
        'SupplierDomain': 'NetworkID',
        'SupplierIdentifier': 'string',
        'ProcurementPortalSharedSecret': 'string',
        'ProcurementPortalInstanceEndpoint': 'string'
    },
    EinvoiceDeliveryEnabled=True|False,
    EinvoiceDeliveryPreference={
        'EinvoiceDeliveryDocumentTypes': [
            'AWS_CLOUD_INVOICE'|'AWS_CLOUD_CREDIT_MEMO'|'AWS_MARKETPLACE_INVOICE'|'AWS_MARKETPLACE_CREDIT_MEMO'|'AWS_REQUEST_FOR_PAYMENT',
        ],
        'EinvoiceDeliveryAttachmentTypes': [
            'INVOICE_PDF'|'RFP_PDF',
        ],
        'Protocol': 'CXML',
        'PurchaseOrderDataSources': [
            {
                'EinvoiceDeliveryDocumentType': 'AWS_CLOUD_INVOICE'|'AWS_CLOUD_CREDIT_MEMO'|'AWS_MARKETPLACE_INVOICE'|'AWS_MARKETPLACE_CREDIT_MEMO'|'AWS_REQUEST_FOR_PAYMENT',
                'PurchaseOrderDataSourceType': 'ASSOCIATED_PURCHASE_ORDER_REQUIRED'|'PURCHASE_ORDER_NOT_REQUIRED'
            },
        ],
        'ConnectionTestingMethod': 'PROD_ENV_DOLLAR_TEST'|'TEST_ENV_REPLAY_TEST',
        'EinvoiceDeliveryActivationDate': datetime(2015, 1, 1)
    },
    PurchaseOrderRetrievalEnabled=True|False,
    Contacts=[
        {
            'Name': 'string',
            'Email': 'string'
        },
    ],
    ClientToken='string'
)
type ProcurementPortalPreferenceArn:

string

param ProcurementPortalPreferenceArn:

[REQUIRED]

The Amazon Resource Name (ARN) of the procurement portal preference to update.

type Selector:

dict

param Selector:

Specifies criteria for selecting which invoices should be processed using a particular procurement portal preference.

  • InvoiceUnitArns (list) --

    The Amazon Resource Name (ARN) of invoice unit identifiers to which this preference applies.

    • (string) --

  • SellerOfRecords (list) --

    The list of seller of record IDs to which this preference applies.

    • (string) --

type ProcurementPortalSharedSecret:

string

param ProcurementPortalSharedSecret:

The updated shared secret or authentication credential for the procurement portal. This value must be encrypted at rest.

type ProcurementPortalInstanceEndpoint:

string

param ProcurementPortalInstanceEndpoint:

The updated endpoint URL where e-invoices will be delivered to the procurement portal. Must be a valid HTTPS URL.

type TestEnvPreference:

dict

param TestEnvPreference:

Updated configuration settings for the test environment of the procurement portal.

  • BuyerDomain (string) -- [REQUIRED]

    The domain identifier to use for the buyer in the test environment.

  • BuyerIdentifier (string) -- [REQUIRED]

    The unique identifier to use for the buyer in the test environment.

  • SupplierDomain (string) -- [REQUIRED]

    The domain identifier to use for the supplier in the test environment.

  • SupplierIdentifier (string) -- [REQUIRED]

    The unique identifier to use for the supplier in the test environment.

  • ProcurementPortalSharedSecret (string) --

    The shared secret or authentication credential to use for secure communication in the test environment.

  • ProcurementPortalInstanceEndpoint (string) --

    The endpoint URL where e-invoices will be delivered in the test environment.

type EinvoiceDeliveryEnabled:

boolean

param EinvoiceDeliveryEnabled:

[REQUIRED]

Updated flag indicating whether e-invoice delivery is enabled for this procurement portal preference.

type EinvoiceDeliveryPreference:

dict

param EinvoiceDeliveryPreference:

Updated e-invoice delivery configuration including document types, attachment types, and customization settings for the portal.

  • EinvoiceDeliveryDocumentTypes (list) -- [REQUIRED]

    The types of e-invoice documents to be delivered.

    • (string) --

  • EinvoiceDeliveryAttachmentTypes (list) --

    The types of attachments to include with the e-invoice delivery.

    • (string) --

  • Protocol (string) -- [REQUIRED]

    The communication protocol to use for e-invoice delivery.

  • PurchaseOrderDataSources (list) -- [REQUIRED]

    The sources of purchase order data to use for e-invoice generation and delivery.

    • (dict) --

      Specifies the source configuration for retrieving purchase order data.

      • EinvoiceDeliveryDocumentType (string) --

        The type of e-invoice document that requires purchase order data.

      • PurchaseOrderDataSourceType (string) --

        The type of source for purchase order data.

  • ConnectionTestingMethod (string) -- [REQUIRED]

    The method to use for testing the connection to the procurement portal.

  • EinvoiceDeliveryActivationDate (datetime) -- [REQUIRED]

    The date when e-invoice delivery should be activated for this preference.

type PurchaseOrderRetrievalEnabled:

boolean

param PurchaseOrderRetrievalEnabled:

[REQUIRED]

Updated flag indicating whether purchase order retrieval is enabled for this procurement portal preference.

type Contacts:

list

param Contacts:

[REQUIRED]

Updated list of contact information for portal administrators and technical contacts.

  • (dict) --

    Represents contact information for a person or role associated with the procurement portal preference.

    • Name (string) --

      The name of the contact person or role.

    • Email (string) --

      The email address of the contact person or role.

type ClientToken:

string

param ClientToken:

A unique, case-sensitive identifier that you provide to ensure idempotency of the request.

This field is autopopulated if not provided.

rtype:

dict

returns:

Response Syntax

{
    'ProcurementPortalPreferenceArn': 'string'
}

Response Structure

  • (dict) --

    • ProcurementPortalPreferenceArn (string) --

      The Amazon Resource Name (ARN) of the updated procurement portal preference.

UpdateInvoiceUnit (updated) Link ¶
Changes (request)
{'ClientToken': 'string'}

You can update the invoice unit configuration at any time, and Amazon Web Services will use the latest configuration at the end of the month.

See also: AWS API Documentation

Request Syntax

client.update_invoice_unit(
    InvoiceUnitArn='string',
    Description='string',
    TaxInheritanceDisabled=True|False,
    Rule={
        'LinkedAccounts': [
            'string',
        ],
        'BillSourceAccounts': [
            'string',
        ]
    },
    ClientToken='string'
)
type InvoiceUnitArn:

string

param InvoiceUnitArn:

[REQUIRED]

The ARN to identify an invoice unit. This information can't be modified or deleted.

type Description:

string

param Description:

The assigned description for an invoice unit. This information can't be modified or deleted.

type TaxInheritanceDisabled:

boolean

param TaxInheritanceDisabled:

Whether the invoice unit based tax inheritance is/ should be enabled or disabled.

type Rule:

dict

param Rule:

The InvoiceUnitRule object used to update invoice units.

  • LinkedAccounts (list) --

    The list of LINKED_ACCOUNT IDs where charges are included within the invoice unit.

    • (string) --

  • BillSourceAccounts (list) --

    A list of Amazon Web Services account IDs that have delegated their billing responsibility to the receiver account through transfer billing. Unlike linked accounts, these bill source accounts can be payer accounts from other organizations that have authorized billing transfer to this account.

    • (string) --

type ClientToken:

string

param ClientToken:

A unique, case-sensitive identifier that you provide to ensure idempotency of the request.

This field is autopopulated if not provided.

rtype:

dict

returns:

Response Syntax

{
    'InvoiceUnitArn': 'string'
}

Response Structure

  • (dict) --

    • InvoiceUnitArn (string) --

      The ARN to identify an invoice unit. This information can't be modified or deleted.

UpdateProcurementPortalPreferenceStatus (updated) Link ¶
Changes (request)
{'ClientToken': 'string'}

This feature API is subject to changing at any time. For more information, see the Amazon Web Services Service Terms (Betas and Previews).

Updates the status of a procurement portal preference, including the activation state of e-invoice delivery and purchase order retrieval features.

See also: AWS API Documentation

Request Syntax

client.update_procurement_portal_preference_status(
    ProcurementPortalPreferenceArn='string',
    EinvoiceDeliveryPreferenceStatus='PENDING_VERIFICATION'|'TEST_INITIALIZED'|'TEST_INITIALIZATION_FAILED'|'TEST_FAILED'|'ACTIVE'|'SUSPENDED',
    EinvoiceDeliveryPreferenceStatusReason='string',
    PurchaseOrderRetrievalPreferenceStatus='PENDING_VERIFICATION'|'TEST_INITIALIZED'|'TEST_INITIALIZATION_FAILED'|'TEST_FAILED'|'ACTIVE'|'SUSPENDED',
    PurchaseOrderRetrievalPreferenceStatusReason='string',
    ClientToken='string'
)
type ProcurementPortalPreferenceArn:

string

param ProcurementPortalPreferenceArn:

[REQUIRED]

The Amazon Resource Name (ARN) of the procurement portal preference to update.

type EinvoiceDeliveryPreferenceStatus:

string

param EinvoiceDeliveryPreferenceStatus:

The updated status of the e-invoice delivery preference.

type EinvoiceDeliveryPreferenceStatusReason:

string

param EinvoiceDeliveryPreferenceStatusReason:

The reason for the e-invoice delivery preference status update, providing context for the change.

type PurchaseOrderRetrievalPreferenceStatus:

string

param PurchaseOrderRetrievalPreferenceStatus:

The updated status of the purchase order retrieval preference.

type PurchaseOrderRetrievalPreferenceStatusReason:

string

param PurchaseOrderRetrievalPreferenceStatusReason:

The reason for the purchase order retrieval preference status update, providing context for the change.

type ClientToken:

string

param ClientToken:

A unique, case-sensitive identifier that you provide to ensure idempotency of the request.

This field is autopopulated if not provided.

rtype:

dict

returns:

Response Syntax

{
    'ProcurementPortalPreferenceArn': 'string'
}

Response Structure

  • (dict) --

    • ProcurementPortalPreferenceArn (string) --

      The Amazon Resource Name (ARN) of the procurement portal preference with updated status.