On this page
No Headings
Oauth 2.0 authentication
Client CredentialsToken URLhttps://api-m.sandbox.paypal.com/v1/oauth2/tokenInheaderScopes
https://uri.paypal.com/services/invoicing/invoices/readThe page number to be retrieved, for the list of items. So, a combination of page=1 and page_size=20 returns the first 20 invoices. A combination of page=2 and page_size=20 returns the next 20 invoices.
11 <= value <= 1000The page size for the search results.
201 <= value <= 100Indicates whether the to show total_pages and total_items in the response.
falseHolds authorization information for external API calls.
^.*$1 <= length <= 16000application/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api-m.sandbox.paypal.com/v2/invoicing/search-invoices?page=1&page_size=1&total_required=true" \ -H "Authorization: Bearer A21AAGHr9qtiRRXH4oYcQokQgV99rGqEIfgrr8xHCclP0OzmD9KVgg5ppIIg1jzJgQkV4wd02svIvBJyg6cLFJjFow_SjBhxQ" \ -H "Content-Type: application/json" \ -d '{ "total_amount_range": { "lower_amount": { "currency_code": "USD", "value": "50.00" }, "upper_amount": { "currency_code": "USD", "value": "50.00" } }, "invoice_date_range": { "start": "2018-06-01", "end": "2018-06-21" } }'{
"total_items": 6,
"total_pages": 1,
"items": [
{
"id": "INV2-Z56S-5LLA-Q52L-CPZ5",
"status": "DRAFT",
"detail": {
"invoice_number": "#123",
"reference": "deal-ref",
"invoice_date": "2018-11-12",
"currency_code": "USD",
"note": "Thank you for your business.",
"term": "No refunds after 30 days.",
"memo": "This is a long contract",
"payment_term": {
"term_type": "NET_10",
"due_date": "2018-11-22"
},
"metadata": {
"create_time": "2018-11-12T08:00:20Z",
"recipient_view_url": "https://www.api-m.paypal.com/invoice/p#Z56S5LLAQ52LCPZ5",
"invoicer_view_url": "https://www.api-m.paypal.com/invoice/details/INV2-Z56S-5LLA-Q52L-CPZ5"
}
},
"invoicer": {
"email_address": "merchant@example.com"
},
"primary_recipients": [
{
"billing_info": {
"email_address": "bill-me@example.com"
}
}
],
"amount": {
"currency_code": "USD",
"value": "74.21"
},
"links": [
{
"href": "https://api-m.paypal.com/v2/invoicing/invoices/INV2-Z56S-5LLA-Q52L-CPZ5",
"rel": "self",
"method": "GET"
}
]
}
],
"links": [
{
"href": "https://api-m.paypal.com/v2/invoicing/invoices?page=2&page_size=10&total_required=true",
"rel": "next",
"method": "POST"
}
]
}{
"name": "string",
"message": "string",
"debug_id": "string",
"details": [],
"links": []
}{
"name": "AUTHENTICATION_FAILURE",
"debug_id": "b1d1f06c7246c",
"message": "Authentication failed due to missing Authorization header, or invalid authentication credentials."
}{
"name": "NOT_AUTHORIZED",
"debug_id": "b1d1f06c7246c",
"message": "Authorization failed due to insufficient permissions."
}{
"name": "INTERNAL_SERVER_ERROR",
"debug_id": "b1d1f06c7246c",
"message": "An internal server error has occurred."
}{
"name": "INTERNAL_SERVER_ERROR",
"debug_id": "b1d1f06c7246c",
"message": "An internal server error has occurred."
}Filters the search by the email address.
^[\S\s]*$0 <= length <= 254Filters the search by the recipient first name.
^[\S\s]*$0 <= length <= 140Filters the search by the recipient last name.
^[\S\s]*$0 <= length <= 140Filters the search by the recipient business name.
^[\S\s]*$0 <= length <= 300Filters the search by the invoice number.
^[\S\s]*$0 <= length <= 25An array of status values.
0 <= items <= 5The reference data. Includes a Purchase Order (PO) number.
^[\S\s]*$0 <= length <= 120The 3-character ISO-4217 currency code that identifies the currency.
^[\S\s]*$3 <= length <= 3A private bookkeeping memo for the user.
^[\S\s]*$0 <= length <= 500The date and time range. Filters invoices by creation date, invoice date, due date, and payment date.
Indicates whether to list merchant-archived invoices in the response. Value is:true. Response lists only merchant-archived invoices.false. Response lists only unarchived invoices.null. Response lists all invoices.
A CSV file of fields to return for the user, if available. Because the invoice object can be very large, field filtering is required. Valid collection fields are items, payments, refunds, additional_recipients_info, and attachments.
0 <= items <= 5