Orderinvoices: createchargeinvoice

Requires authorization

Creates a charge invoice for a shipment group, and triggers a charge capture for orderinvoice enabled orders. Try it now.

Request

HTTP request

POST https://www.googleapis.com/content/v2.1/merchantId/orderinvoices/orderId/createChargeInvoice

Parameters

Parameter name Value Description
Path parameters
merchantId unsigned long The ID of the account that manages the order. This cannot be a multi-client account.
orderId string The ID of the order.

Authorization

This request requires authorization with the following scope (read more about authentication and authorization).

Scope
https://www.googleapis.com/auth/content

Request body

In the request body, supply data with the following structure:

{
  "invoiceId": string,
  "operationId": string,
  "shipmentGroupId": string,
  "lineItemInvoices": [
    {
      "lineItemId": string,
      "productId": string,
      "shipmentUnitIds": [
        string
      ],
      "unitInvoice": {
        "unitPrice": {
          "value": string,
          "currency": string
        },
        "unitPriceTaxes": [
          {
            "taxType": string,
            "taxName": string,
            "taxAmount": {
              "value": string,
              "currency": string
            }
          }
        ],
        "additionalCharges": [
          {
            "type": string,
            "additionalChargeAmount": {
              "priceAmount": {
                "value": string,
                "currency": string
              },
              "taxAmount": {
                "value": string,
                "currency": string
              }
            }
          }
        ]
      }
    }
  ],
  "invoiceSummary": {
    "productTotal": {
      "priceAmount": {
        "value": string,
        "currency": string
      },
      "taxAmount": {
        "value": string,
        "currency": string
      }
    },
    "additionalChargeSummaries": [
      {
        "type": string,
        "totalAmount": {
          "priceAmount": {
            "value": string,
            "currency": string
          },
          "taxAmount": {
            "value": string,
            "currency": string
          }
        }
      }
    ]
  }
}
Property name Value Description Notes
invoiceId string [required] The ID of the invoice.
operationId string [required] The ID of the operation, unique across all operations for a given order.
shipmentGroupId string [required] ID of the shipment group. It is assigned by the merchant in the shipLineItems method and is used to group multiple line items that have the same kind of shipping charges.
lineItemInvoices[] list [required] Invoice details per line item.
lineItemInvoices[].lineItemId string ID of the line item. Either lineItemId or productId must be set.
lineItemInvoices[].productId string ID of the product. This is the REST ID used in the products service. Either lineItemId or productId must be set.
lineItemInvoices[].shipmentUnitIds[] list [required] The shipment unit ID is assigned by the merchant and defines individual quantities within a line item. The same ID can be assigned to units that are the same while units that differ must be assigned a different ID (for example: free or promotional units).
lineItemInvoices[].unitInvoice nested object [required] Invoice details for a single unit.
lineItemInvoices[].unitInvoice.unitPriceTaxes[] list Tax amounts to apply to the unit price.
lineItemInvoices[].unitInvoice.unitPriceTaxes[].taxType string [required] Type of the tax.

Acceptable values are:
  • "otherFee"
  • "otherFeeTax"
  • "sales"
lineItemInvoices[].unitInvoice.unitPriceTaxes[].taxName string Optional name of the tax type. This should only be provided if taxType is otherFeeTax.
lineItemInvoices[].unitInvoice.unitPriceTaxes[].taxAmount nested object [required] Tax amount for the tax type.
lineItemInvoices[].unitInvoice.unitPriceTaxes[].taxAmount.value string The price represented as a number. writable
lineItemInvoices[].unitInvoice.unitPriceTaxes[].taxAmount.currency string The currency of the price. writable
lineItemInvoices[].unitInvoice.additionalCharges[] list Additional charges for a unit, e.g. shipping costs.
lineItemInvoices[].unitInvoice.additionalCharges[].type string [required] Type of the additional charge.

Acceptable values are:
  • "shipping"
lineItemInvoices[].unitInvoice.additionalCharges[].additionalChargeAmount nested object [required] Amount of the additional charge.
invoiceSummary nested object [required] Invoice summary.
invoiceSummary.productTotal nested object [required] Total price for the product.
invoiceSummary.additionalChargeSummaries[] list Summary of the total amounts of the additional charges.
invoiceSummary.additionalChargeSummaries[].type string [required] Type of the additional charge.

Acceptable values are:
  • "shipping"
invoiceSummary.additionalChargeSummaries[].totalAmount nested object [required] Total additional charge for this type.
lineItemInvoices[].unitInvoice.additionalCharges[].additionalChargeAmount.priceAmount nested object [required] The pre-tax or post-tax price depending on the location of the order.
lineItemInvoices[].unitInvoice.additionalCharges[].additionalChargeAmount.priceAmount.value string The price represented as a number. writable
lineItemInvoices[].unitInvoice.additionalCharges[].additionalChargeAmount.priceAmount.currency string The currency of the price. writable
lineItemInvoices[].unitInvoice.additionalCharges[].additionalChargeAmount.taxAmount nested object [required] Tax value.
lineItemInvoices[].unitInvoice.additionalCharges[].additionalChargeAmount.taxAmount.value string The price represented as a number. writable
lineItemInvoices[].unitInvoice.additionalCharges[].additionalChargeAmount.taxAmount.currency string The currency of the price. writable
invoiceSummary.productTotal.priceAmount nested object [required] The pre-tax or post-tax price depending on the location of the order.
invoiceSummary.productTotal.priceAmount.value string The price represented as a number. writable
invoiceSummary.productTotal.priceAmount.currency string The currency of the price. writable
invoiceSummary.productTotal.taxAmount nested object [required] Tax value.
invoiceSummary.productTotal.taxAmount.value string The price represented as a number. writable
invoiceSummary.productTotal.taxAmount.currency string The currency of the price. writable
invoiceSummary.additionalChargeSummaries[].totalAmount.priceAmount nested object [required] The pre-tax or post-tax price depending on the location of the order.
invoiceSummary.additionalChargeSummaries[].totalAmount.priceAmount.value string The price represented as a number. writable
invoiceSummary.additionalChargeSummaries[].totalAmount.priceAmount.currency string The currency of the price. writable
invoiceSummary.additionalChargeSummaries[].totalAmount.taxAmount nested object [required] Tax value.
invoiceSummary.additionalChargeSummaries[].totalAmount.taxAmount.value string The price represented as a number. writable
invoiceSummary.additionalChargeSummaries[].totalAmount.taxAmount.currency string The currency of the price. writable
lineItemInvoices[].unitInvoice.unitPrice nested object [required] Pre-tax or post-tax price of the unit depending on the locality of the order.
lineItemInvoices[].unitInvoice.unitPrice.value string The price represented as a number. writable
lineItemInvoices[].unitInvoice.unitPrice.currency string The currency of the price. writable

Response

If successful, this method returns a response body with the following structure:

{
  "kind": "content#orderinvoicesCreateChargeInvoiceResponse",
  "executionStatus": string
}
Property name Value Description Notes
kind string Identifies what kind of resource this is. Value: the fixed string "content#orderinvoicesCreateChargeInvoiceResponse".
executionStatus string The status of the execution.

Acceptable values are:
  • "duplicate"
  • "executed"

Send feedback about...

Content API for Shopping