Skip to main content
GET
/
v2
/
invoicing
/
templates
List templates
curl --request GET \
  --url https://api-m.sandbox.paypal.com/v2/invoicing/templates \
  --header 'Authorization: Bearer <token>'
{
  "addresses": [
    {
      "address_line_1": "<any>",
      "address_line_2": "<any>",
      "address_line_3": "<any>",
      "admin_area_4": "<any>",
      "admin_area_3": "<any>",
      "admin_area_2": "<any>",
      "admin_area_1": "<any>",
      "postal_code": "<any>",
      "country_code": "<any>",
      "address_details": "<any>"
    }
  ],
  "emails": "<string>",
  "phones": [
    {
      "country_code": "<string>",
      "national_number": "<string>",
      "extension_number": "<string>",
      "phone_type": "FAX"
    }
  ],
  "templates": [
    {
      "id": "<string>",
      "name": "<string>",
      "default_template": true,
      "template_info": {
        "detail": {
          "reference": "<string>",
          "currency_code": "<string>",
          "note": "<string>",
          "terms_and_conditions": "<string>",
          "memo": "<string>",
          "attachments": [
            {
              "id": "<string>",
              "reference_url": "<string>",
              "content_type": "<string>",
              "create_time": "<string>",
              "size": "<string>"
            }
          ],
          "payment_term": {
            "term_type": "DUE_ON_RECEIPT"
          },
          "metadata": {
            "create_time": "<string>",
            "created_by": "<string>",
            "last_update_time": "<string>",
            "last_updated_by": "<string>"
          }
        },
        "invoicer": {
          "business_name": "<string>",
          "name": {
            "prefix": "<any>",
            "given_name": "<any>",
            "surname": "<any>",
            "middle_name": "<any>",
            "suffix": "<any>",
            "alternate_full_name": "<any>",
            "full_name": "<any>"
          },
          "address": {
            "address_line_1": "<any>",
            "address_line_2": "<any>",
            "address_line_3": "<any>",
            "admin_area_4": "<any>",
            "admin_area_3": "<any>",
            "admin_area_2": "<any>",
            "admin_area_1": "<any>",
            "postal_code": "<any>",
            "country_code": "<any>",
            "address_details": "<any>"
          },
          "email_address": "<string>",
          "phones": [
            {
              "country_code": "<string>",
              "national_number": "<string>",
              "extension_number": "<string>",
              "phone_type": "FAX"
            }
          ],
          "website": "<string>",
          "tax_id": "<string>",
          "additional_notes": "<string>",
          "logo_url": "<string>"
        },
        "primary_recipients": [
          {
            "billing_info": {
              "business_name": "<string>",
              "name": {
                "prefix": "<any>",
                "given_name": "<any>",
                "surname": "<any>",
                "middle_name": "<any>",
                "suffix": "<any>",
                "alternate_full_name": "<any>",
                "full_name": "<any>"
              },
              "address": {
                "address_line_1": "<any>",
                "address_line_2": "<any>",
                "address_line_3": "<any>",
                "admin_area_4": "<any>",
                "admin_area_3": "<any>",
                "admin_area_2": "<any>",
                "admin_area_1": "<any>",
                "postal_code": "<any>",
                "country_code": "<any>",
                "address_details": "<any>"
              },
              "email_address": "<string>",
              "phones": [
                {
                  "country_code": "<any>",
                  "national_number": "<any>",
                  "extension_number": "<any>",
                  "phone_type": "<any>"
                }
              ],
              "additional_info": "<string>",
              "language": "<string>"
            },
            "shipping_info": {
              "business_name": "<string>",
              "name": {
                "prefix": "<any>",
                "given_name": "<any>",
                "surname": "<any>",
                "middle_name": "<any>",
                "suffix": "<any>",
                "alternate_full_name": "<any>",
                "full_name": "<any>"
              },
              "address": {
                "address_line_1": "<any>",
                "address_line_2": "<any>",
                "address_line_3": "<any>",
                "admin_area_4": "<any>",
                "admin_area_3": "<any>",
                "admin_area_2": "<any>",
                "admin_area_1": "<any>",
                "postal_code": "<any>",
                "country_code": "<any>",
                "address_details": "<any>"
              }
            }
          }
        ],
        "additional_recipients": [
          "<string>"
        ],
        "items": [
          {
            "id": "<string>",
            "name": "<string>",
            "description": "<string>",
            "quantity": "<string>",
            "unit_amount": {
              "currency_code": "<string>",
              "value": "<string>"
            },
            "tax": {
              "name": "<string>",
              "percent": "<string>",
              "amount": {
                "currency_code": "<string>",
                "value": "<string>"
              },
              "tax_note": "<string>"
            },
            "item_date": "<string>",
            "discount": {
              "percent": "<string>",
              "amount": {
                "currency_code": "<string>",
                "value": "<string>"
              }
            },
            "unit_of_measure": "QUANTITY"
          }
        ],
        "configuration": {
          "tax_calculated_after_discount": true,
          "tax_inclusive": false,
          "allow_tip": false,
          "partial_payment": {
            "allow_partial_payment": false,
            "minimum_amount_due": {
              "currency_code": "<string>",
              "value": "<string>"
            }
          },
          "has_conditional_rule": false
        },
        "amount": {
          "currency_code": "<string>",
          "value": "<string>",
          "breakdown": {
            "item_total": {
              "currency_code": "<string>",
              "value": "<string>"
            },
            "discount": {
              "invoice_discount": {
                "percent": "<string>",
                "amount": {
                  "currency_code": "<string>",
                  "value": "<string>"
                }
              },
              "item_discount": {
                "currency_code": "<string>",
                "value": "<string>"
              }
            },
            "tax_total": {
              "currency_code": "<string>",
              "value": "<string>"
            },
            "shipping": {
              "amount": {
                "currency_code": "<string>",
                "value": "<string>"
              },
              "tax": {
                "name": "<string>",
                "percent": "<string>",
                "amount": {
                  "currency_code": "<string>",
                  "value": "<string>"
                },
                "tax_note": "<string>"
              }
            },
            "custom": {
              "label": "<string>",
              "amount": {
                "currency_code": "<string>",
                "value": "<string>"
              }
            }
          }
        },
        "due_amount": {
          "currency_code": "<string>",
          "value": "<string>"
        }
      },
      "settings": {
        "template_item_settings": [
          {
            "field_name": "ITEMS_QUANTITY",
            "display_preference": {
              "hidden": true
            }
          }
        ],
        "template_subtotal_settings": [
          {
            "field_name": "DISCOUNT",
            "display_preference": {
              "hidden": true
            }
          }
        ]
      },
      "unit_of_measure": "QUANTITY",
      "standard_template": true,
      "links": [
        {
          "href": "<string>",
          "rel": "<string>",
          "method": "GET"
        }
      ]
    }
  ],
  "links": [
    {
      "href": "<string>",
      "rel": "<string>",
      "method": "GET"
    }
  ]
}

Authorizations

Authorization
string
header
required

Oauth 2.0 authentication

Query Parameters

fields
string
default:all

The fields to return in the response. Value is all or none. To return only the template name, ID, and default attributes, specify none.

Maximum length: 2147483647
page
integer
default:1

The page number to be retrieved, for the list of templates. So, a combination of page=1 and page_size=20 returns the first 20 templates. A combination of page=2 and page_size=20 returns the next 20 templates.

Required range: 1 <= x <= 1000
page_size
integer
default:20

The maximum number of templates to return in the response.

Required range: 1 <= x <= 100

Response

A successful request returns the HTTP 200 OK status code and a JSON response body that lists invoices.

An array of merchant-created templates with associated details that include the emails, addresses, and phone numbers from the user's PayPal profile.

addresses
Portable Postal Address (Medium-Grained) · object[]

An array of addresses in the user's PayPal profile.

Maximum length: 2147483647
emails
string<ppaas_common_email_address_v2>

An array of emails in the user's PayPal profile.

Required string length: 3 - 254
phones
Phone Detail · object[]

An array of phone numbers in the user's PayPal profile.

Maximum length: 2147483647
templates
Template · object[]

An array of details for each template. If fields is none, returns only the template name, ID, and default status.

Maximum length: 2147483647

An array of request-related HATEOAS links.

Maximum length: 2147483647
I