Mock APIs
Teams
Organisations
Data sources
Database connections
Usage
Access control
Stub Mappings
- GETGet all stub mappings
- POSTCreate a new stub mapping
- DELDelete all stub mappings
- POSTReset stub mappings
- POSTPersist stub mappings
- POSTImport stub mappings
- GETGet stub mapping by ID
- PUTUpdate a stub mapping
- DELDelete a stub mapping
- POSTFind stub mappings matching metadata
- POSTDelete stub mappings matching metadata
Requests
- GETGet all requests in journal
- DELDelete all requests in journal
- GETGet request by ID
- DELDelete request by ID
- POSTEmpty the request journaldeprecated
- POSTCount requests by criteria
- POSTRemove requests by criteria
- POSTDelete requests mappings matching metadata
- POSTFind requests by criteria
- GETFind unmatched requests
OpenAPI
Imports
Stub Mappings
Import stub mappings
Import a collection of stub mappings. Note: a more flexible import operation is available at the Import endpoint.
POST
/
v1
/
mock-apis
/
{mockApiId}
/
mappings
/
import
Copy
Ask AI
curl --request POST \
--url https://wmc.wiremockapi.cloud/v1/mock-apis/{mockApiId}/mappings/import \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"mappings": [
{
"id": "7e6d6733-881e-416d-9f6c-bad8d5015d0f",
"name": "Get v2 invoicing invoices by invoiceId",
"request": {
"urlPathTemplate": "/v2/invoicing/invoices/{invoiceId}",
"method": "GET",
"pathParameters": {
"invoiceId": {
"equalTo": "INV2-NS4E-L7P4-RZ6B-KNZY"
}
}
},
"response": {
"status": 200,
"body": "{\"id\":\"INV2-NS4E-L7P4-RZ6B-KNZY\",\"status\":\"DRAFT\",\"detail\":{\"reference\":\"<The reference data. Includes a post office (PO) number.>\",\"currency_code\":\"USD\",\"note\":\"<A note to the invoice recipient. Also appears on the invoice notification email.>\",\"terms_and_conditions\":\"<The general terms of the invoice. Can include return or cancellation policy and other terms and conditions.>\",\"memo\":\"<A private bookkeeping note for merchant.>\",\"additional_data\":\"<Any additional information. Includes business hours.>\",\"category_code\":\"SHIPPABLE\",\"invoice_number\":\"17494664982\",\"invoice_date\":\"2022-02-04\",\"payment_term\":{\"term_type\":\"NET_10\",\"due_date\":\"2022-02-14\"},\"viewed_by_recipient\":false,\"group_draft\":false,\"metadata\":{\"create_time\":\"2025-06-09T10:54:58Z\",\"last_update_time\":\"2025-06-09T10:54:58Z\",\"created_by_flow\":\"REGULAR_SINGLE\",\"recipient_view_url\":\"https://www.sandbox.paypal.com/invoice/p/#NS4EL7P4RZ6BKNZY\",\"invoicer_view_url\":\"https://www.sandbox.paypal.com/invoice/details/INV2-NS4E-L7P4-RZ6B-KNZY\",\"caller_type\":\"API_V2_INVOICE\",\"spam_info\":{}},\"archived\":false},\"invoicer\":{\"name\":{\"given_name\":\"David\",\"surname\":\"Larusso\",\"full_name\":\"David Larusso\"},\"address\":{\"address_line_1\":\"123 Townsend St\",\"address_line_2\":\"Floor 6\",\"admin_area_2\":\"San Francisco\",\"admin_area_1\":\"CA\",\"postal_code\":\"94107\",\"country_code\":\"US\"},\"phones\":[{\"country_code\":\"001\",\"national_number\":\"4085551234\",\"phone_type\":\"MOBILE\"}],\"website\":\"www.example.com\",\"tax_id\":\"XX-XXXXXXX\",\"additional_notes\":\"<Any additional information. Includes business hours.>\",\"logo_url\":\"https://example.com/logo.png\"},\"primary_recipients\":[{\"billing_info\":{\"name\":{\"given_name\":\"Stephanie\",\"surname\":\"Meyers\",\"full_name\":\"Stephanie Meyers\"},\"address\":{\"address_line_1\":\"1234 Main Street\",\"admin_area_2\":\"Anytown\",\"admin_area_1\":\"CA\",\"postal_code\":\"98765\",\"country_code\":\"US\"},\"email_address\":\"foobuyer@example.com\"},\"shipping_info\":{\"name\":{\"given_name\":\"Stephanie\",\"surname\":\"Meyers\",\"full_name\":\"Stephanie Meyers\"},\"address\":{\"address_line_1\":\"1234 Main Street\",\"admin_area_2\":\"Anytown\",\"admin_area_1\":\"CA\",\"postal_code\":\"98765\",\"country_code\":\"US\"}}}],\"items\":[{\"id\":\"ITEM-4M535543K7257150H\",\"name\":\"Yoga Mat\",\"description\":\"Elastic mat to practice yoga.\",\"quantity\":\"1\",\"unit_amount\":{\"currency_code\":\"USD\",\"value\":\"50.00\"},\"tax\":{\"id\":\"TAX-1R2044969B8060438\",\"name\":\"Sales Tax\",\"percent\":\"7.25\",\"amount\":{\"currency_code\":\"USD\",\"value\":\"3.27\"}},\"discount\":{\"percent\":\"5\",\"amount\":{\"currency_code\":\"USD\",\"value\":\"-2.50\"}},\"unit_of_measure\":\"QUANTITY\"},{\"id\":\"ITEM-0SE42747HP857643T\",\"name\":\"Yoga t-shirt\",\"quantity\":\"1\",\"unit_amount\":{\"currency_code\":\"USD\",\"value\":\"10.00\"},\"tax\":{\"id\":\"TAX-1R2044969B8060438\",\"name\":\"Sales Tax\",\"percent\":\"7.25\",\"amount\":{\"currency_code\":\"USD\",\"value\":\"0.34\"}},\"discount\":{\"amount\":{\"currency_code\":\"USD\",\"value\":\"-5.00\"}},\"unit_of_measure\":\"QUANTITY\"}],\"configuration\":{\"tax_calculated_after_discount\":true,\"tax_inclusive\":false,\"allow_tip\":true,\"partial_payment\":{\"allow_partial_payment\":true,\"minimum_amount_due\":{\"currency_code\":\"USD\",\"value\":\"20.00\"}},\"allow_only_pay_by_bank\":false,\"template_id\":\"TEMP-0P400848HY4308238\"},\"amount\":{\"breakdown\":{\"item_total\":{\"currency_code\":\"USD\",\"value\":\"60.00\"},\"discount\":{\"invoice_discount\":{\"percent\":\"5\",\"amount\":{\"currency_code\":\"USD\",\"value\":\"-2.63\"}},\"item_discount\":{\"currency_code\":\"USD\",\"value\":\"-7.50\"}},\"tax_total\":{\"currency_code\":\"USD\",\"value\":\"4.34\"},\"shipping\":{\"amount\":{\"currency_code\":\"USD\",\"value\":\"10.00\"},\"tax\":{\"id\":\"TAX-1R2044969B8060438\",\"name\":\"Sales Tax\",\"percent\":\"7.25\",\"amount\":{\"currency_code\":\"USD\",\"value\":\"0.73\"}}},\"custom\":{\"label\":\"Packing Charges\",\"amount\":{\"currency_code\":\"USD\",\"value\":\"10.00\"}}},\"currency_code\":\"USD\",\"value\":\"74.21\"},\"due_amount\":{\"currency_code\":\"USD\",\"value\":\"74.21\"},\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-NS4E-L7P4-RZ6B-KNZY\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-NS4E-L7P4-RZ6B-KNZY/send\",\"rel\":\"send\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-NS4E-L7P4-RZ6B-KNZY\",\"rel\":\"replace\",\"method\":\"PUT\"},{\"href\":\"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-NS4E-L7P4-RZ6B-KNZY\",\"rel\":\"delete\",\"method\":\"DELETE\"},{\"href\":\"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-NS4E-L7P4-RZ6B-KNZY/payments\",\"rel\":\"record-payment\",\"method\":\"POST\"}],\"unilateral\":false}",
"headers": {
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"Cache-Control": "max-age=0, no-cache, no-store, must-revalidate",
"Vary": "Accept-Encoding",
"Content-Type": "application/json"
}
},
"persistent": true
},
{
"id": "2791b6fe-bbbe-4102-a3fd-721fb9ba1557",
"name": "Create v2 invoicing invoices",
"request": {
"urlPathTemplate": "/v2/invoicing/invoices",
"method": "POST",
"bodyPatterns": [
{
"equalToJson": "{\n \"detail\": {\n \"invoice_number\": \"17494664982\",\n \"invoice_date\": \"2022-02-04\",\n \"payment_term\": {\n \"term_type\": \"NET_10\",\n \"due_date\": \"2022-02-14\"\n },\n \"currency_code\": \"USD\",\n \"reference\": \"<The reference data. Includes a post office (PO) number.>\",\n \"note\": \"<A note to the invoice recipient. Also appears on the invoice notification email.>\",\n \"terms_and_conditions\": \"<The general terms of the invoice. Can include return or cancellation policy and other terms and conditions.>\",\n \"memo\": \"<A private bookkeeping note for merchant.>\"\n },\n \"invoicer\": {\n \"name\": {\n \"given_name\": \"David\",\n \"surname\": \"Larusso\"\n },\n \"address\": {\n \"address_line_1\": \"123 Townsend St\",\n \"address_line_2\": \"Floor 6\",\n \"admin_area_2\": \"San Francisco\",\n \"admin_area_1\": \"CA\",\n \"postal_code\": \"94107\",\n \"country_code\": \"US\"\n },\n \"phones\": [\n {\n \"country_code\": \"001\",\n \"national_number\": \"4085551234\",\n \"phone_type\": \"MOBILE\"\n }\n ],\n \"website\": \"www.example.com\",\n \"tax_id\": \"XX-XXXXXXX\",\n \"logo_url\": \"https://example.com/logo.png\",\n \"additional_notes\": \"<Any additional information. Includes business hours.>\"\n },\n \"primary_recipients\": [\n {\n \"billing_info\": {\n \"name\": {\n \"given_name\": \"Stephanie\",\n \"surname\": \"Meyers\"\n },\n \"address\": {\n \"address_line_1\": \"1234 Main Street\",\n \"admin_area_2\": \"Anytown\",\n \"admin_area_1\": \"CA\",\n \"postal_code\": \"98765\",\n \"country_code\": \"US\"\n },\n \"email_address\": \"foobuyer@example.com\",\n \"phones\": [\n {\n \"country_code\": \"001\",\n \"national_number\": \"4884551234\",\n \"phone_type\": \"HOME\"\n }\n ],\n \"additional_info_value\": \"add-info\"\n },\n \"shipping_info\": {\n \"name\": {\n \"given_name\": \"Stephanie\",\n \"surname\": \"Meyers\"\n },\n \"address\": {\n \"address_line_1\": \"1234 Main Street\",\n \"admin_area_2\": \"Anytown\",\n \"admin_area_1\": \"CA\",\n \"postal_code\": \"98765\",\n \"country_code\": \"US\"\n }\n }\n }\n ],\n \"items\": [\n {\n \"name\": \"Yoga Mat\",\n \"description\": \"Elastic mat to practice yoga.\",\n \"quantity\": \"1\",\n \"unit_amount\": {\n \"currency_code\": \"USD\",\n \"value\": \"50.00\"\n },\n \"tax\": {\n \"name\": \"Sales Tax\",\n \"percent\": \"7.25\"\n },\n \"discount\": {\n \"percent\": \"5\"\n },\n \"unit_of_measure\": \"QUANTITY\"\n },\n {\n \"name\": \"Yoga t-shirt\",\n \"quantity\": \"1\",\n \"unit_amount\": {\n \"currency_code\": \"USD\",\n \"value\": \"10.00\"\n },\n \"tax\": {\n \"name\": \"Sales Tax\",\n \"percent\": \"7.25\"\n },\n \"discount\": {\n \"amount\": {\n \"currency_code\": \"USD\",\n \"value\": \"5.00\"\n }\n },\n \"unit_of_measure\": \"QUANTITY\"\n }\n ],\n \"configuration\": {\n \"partial_payment\": {\n \"allow_partial_payment\": true,\n \"minimum_amount_due\": {\n \"currency_code\": \"USD\",\n \"value\": \"20.00\"\n }\n },\n \"allow_tip\": true,\n \"tax_calculated_after_discount\": true,\n \"tax_inclusive\": false\n },\n \"amount\": {\n \"breakdown\": {\n \"custom\": {\n \"label\": \"Packing Charges\",\n \"amount\": {\n \"currency_code\": \"USD\",\n \"value\": \"10.00\"\n }\n },\n \"shipping\": {\n \"amount\": {\n \"currency_code\": \"USD\",\n \"value\": \"10.00\"\n },\n \"tax\": {\n \"name\": \"Sales Tax\",\n \"percent\": \"7.25\"\n }\n },\n \"discount\": {\n \"invoice_discount\": {\n \"percent\": \"5\"\n }\n }\n }\n }\n}",
"ignoreArrayOrder": true,
"ignoreExtraElements": true
}
]
},
"response": {
"status": 201,
"body": "{\"id\":\"INV2-NS4E-L7P4-RZ6B-KNZY\",\"status\":\"DRAFT\",\"detail\":{\"reference\":\"<The reference data. Includes a post office (PO) number.>\",\"currency_code\":\"USD\",\"note\":\"<A note to the invoice recipient. Also appears on the invoice notification email.>\",\"terms_and_conditions\":\"<The general terms of the invoice. Can include return or cancellation policy and other terms and conditions.>\",\"memo\":\"<A private bookkeeping note for merchant.>\",\"additional_data\":\"<Any additional information. Includes business hours.>\",\"category_code\":\"SHIPPABLE\",\"invoice_number\":\"17494664982\",\"invoice_date\":\"2022-02-04\",\"payment_term\":{\"term_type\":\"NET_10\",\"due_date\":\"2022-02-14\"},\"viewed_by_recipient\":false,\"group_draft\":false,\"metadata\":{\"create_time\":\"2025-06-09T10:54:58Z\",\"last_update_time\":\"2025-06-09T10:54:58Z\",\"created_by_flow\":\"REGULAR_SINGLE\",\"recipient_view_url\":\"https://www.sandbox.paypal.com/invoice/p/#NS4EL7P4RZ6BKNZY\",\"invoicer_view_url\":\"https://www.sandbox.paypal.com/invoice/details/INV2-NS4E-L7P4-RZ6B-KNZY\",\"caller_type\":\"API_V2_INVOICE\",\"spam_info\":{}},\"archived\":false},\"invoicer\":{\"name\":{\"given_name\":\"David\",\"surname\":\"Larusso\",\"full_name\":\"David Larusso\"},\"address\":{\"address_line_1\":\"123 Townsend St\",\"address_line_2\":\"Floor 6\",\"admin_area_2\":\"San Francisco\",\"admin_area_1\":\"CA\",\"postal_code\":\"94107\",\"country_code\":\"US\"},\"phones\":[{\"country_code\":\"001\",\"national_number\":\"4085551234\",\"phone_type\":\"MOBILE\"}],\"website\":\"www.example.com\",\"tax_id\":\"XX-XXXXXXX\",\"additional_notes\":\"<Any additional information. Includes business hours.>\",\"logo_url\":\"https://example.com/logo.png\"},\"primary_recipients\":[{\"billing_info\":{\"name\":{\"given_name\":\"Stephanie\",\"surname\":\"Meyers\",\"full_name\":\"Stephanie Meyers\"},\"address\":{\"address_line_1\":\"1234 Main Street\",\"admin_area_2\":\"Anytown\",\"admin_area_1\":\"CA\",\"postal_code\":\"98765\",\"country_code\":\"US\"},\"email_address\":\"foobuyer@example.com\"},\"shipping_info\":{\"name\":{\"given_name\":\"Stephanie\",\"surname\":\"Meyers\",\"full_name\":\"Stephanie Meyers\"},\"address\":{\"address_line_1\":\"1234 Main Street\",\"admin_area_2\":\"Anytown\",\"admin_area_1\":\"CA\",\"postal_code\":\"98765\",\"country_code\":\"US\"}}}],\"items\":[{\"id\":\"ITEM-4M535543K7257150H\",\"name\":\"Yoga Mat\",\"description\":\"Elastic mat to practice yoga.\",\"quantity\":\"1\",\"unit_amount\":{\"currency_code\":\"USD\",\"value\":\"50.00\"},\"tax\":{\"id\":\"TAX-1R2044969B8060438\",\"name\":\"Sales Tax\",\"percent\":\"7.25\",\"amount\":{\"currency_code\":\"USD\",\"value\":\"3.27\"}},\"discount\":{\"percent\":\"5\",\"amount\":{\"currency_code\":\"USD\",\"value\":\"-2.50\"}},\"unit_of_measure\":\"QUANTITY\"},{\"id\":\"ITEM-0SE42747HP857643T\",\"name\":\"Yoga t-shirt\",\"quantity\":\"1\",\"unit_amount\":{\"currency_code\":\"USD\",\"value\":\"10.00\"},\"tax\":{\"id\":\"TAX-1R2044969B8060438\",\"name\":\"Sales Tax\",\"percent\":\"7.25\",\"amount\":{\"currency_code\":\"USD\",\"value\":\"0.34\"}},\"discount\":{\"amount\":{\"currency_code\":\"USD\",\"value\":\"-5.00\"}},\"unit_of_measure\":\"QUANTITY\"}],\"configuration\":{\"tax_calculated_after_discount\":true,\"tax_inclusive\":false,\"allow_tip\":true,\"partial_payment\":{\"allow_partial_payment\":true,\"minimum_amount_due\":{\"currency_code\":\"USD\",\"value\":\"20.00\"}},\"allow_only_pay_by_bank\":false,\"template_id\":\"TEMP-0P400848HY4308238\"},\"amount\":{\"breakdown\":{\"item_total\":{\"currency_code\":\"USD\",\"value\":\"60.00\"},\"discount\":{\"invoice_discount\":{\"percent\":\"5\",\"amount\":{\"currency_code\":\"USD\",\"value\":\"-2.63\"}},\"item_discount\":{\"currency_code\":\"USD\",\"value\":\"-7.50\"}},\"tax_total\":{\"currency_code\":\"USD\",\"value\":\"4.34\"},\"shipping\":{\"amount\":{\"currency_code\":\"USD\",\"value\":\"10.00\"},\"tax\":{\"id\":\"TAX-1R2044969B8060438\",\"name\":\"Sales Tax\",\"percent\":\"7.25\",\"amount\":{\"currency_code\":\"USD\",\"value\":\"0.73\"}}},\"custom\":{\"label\":\"Packing Charges\",\"amount\":{\"currency_code\":\"USD\",\"value\":\"10.00\"}}},\"currency_code\":\"USD\",\"value\":\"74.21\"},\"due_amount\":{\"currency_code\":\"USD\",\"value\":\"74.21\"},\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-NS4E-L7P4-RZ6B-KNZY\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-NS4E-L7P4-RZ6B-KNZY/send\",\"rel\":\"send\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-NS4E-L7P4-RZ6B-KNZY\",\"rel\":\"replace\",\"method\":\"PUT\"},{\"href\":\"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-NS4E-L7P4-RZ6B-KNZY\",\"rel\":\"delete\",\"method\":\"DELETE\"},{\"href\":\"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-NS4E-L7P4-RZ6B-KNZY/payments\",\"rel\":\"record-payment\",\"method\":\"POST\"}],\"unilateral\":false}",
"headers": {
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"Cache-Control": "max-age=0, no-cache, no-store, must-revalidate",
"Vary": "Accept-Encoding",
"Location": "https://api-m.sandbox.paypal.com:8443/v2/invoicing/invoices/INV2-NS4E-L7P4-RZ6B-KNZY",
"Content-Type": "application/json"
}
},
"persistent": true
}
]
}'
Authorizations
Basic authentication header of the form Basic <encoded-value>
, where <encoded-value>
is the base64-encoded string username:password
.
Path Parameters
The ID of the Mock API
Required string length:
5 - 10
Example:
"jjl8y"
Body
application/json
Response
200
Successfully imported
Copy
Ask AI
curl --request POST \
--url https://wmc.wiremockapi.cloud/v1/mock-apis/{mockApiId}/mappings/import \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"mappings": [
{
"id": "7e6d6733-881e-416d-9f6c-bad8d5015d0f",
"name": "Get v2 invoicing invoices by invoiceId",
"request": {
"urlPathTemplate": "/v2/invoicing/invoices/{invoiceId}",
"method": "GET",
"pathParameters": {
"invoiceId": {
"equalTo": "INV2-NS4E-L7P4-RZ6B-KNZY"
}
}
},
"response": {
"status": 200,
"body": "{\"id\":\"INV2-NS4E-L7P4-RZ6B-KNZY\",\"status\":\"DRAFT\",\"detail\":{\"reference\":\"<The reference data. Includes a post office (PO) number.>\",\"currency_code\":\"USD\",\"note\":\"<A note to the invoice recipient. Also appears on the invoice notification email.>\",\"terms_and_conditions\":\"<The general terms of the invoice. Can include return or cancellation policy and other terms and conditions.>\",\"memo\":\"<A private bookkeeping note for merchant.>\",\"additional_data\":\"<Any additional information. Includes business hours.>\",\"category_code\":\"SHIPPABLE\",\"invoice_number\":\"17494664982\",\"invoice_date\":\"2022-02-04\",\"payment_term\":{\"term_type\":\"NET_10\",\"due_date\":\"2022-02-14\"},\"viewed_by_recipient\":false,\"group_draft\":false,\"metadata\":{\"create_time\":\"2025-06-09T10:54:58Z\",\"last_update_time\":\"2025-06-09T10:54:58Z\",\"created_by_flow\":\"REGULAR_SINGLE\",\"recipient_view_url\":\"https://www.sandbox.paypal.com/invoice/p/#NS4EL7P4RZ6BKNZY\",\"invoicer_view_url\":\"https://www.sandbox.paypal.com/invoice/details/INV2-NS4E-L7P4-RZ6B-KNZY\",\"caller_type\":\"API_V2_INVOICE\",\"spam_info\":{}},\"archived\":false},\"invoicer\":{\"name\":{\"given_name\":\"David\",\"surname\":\"Larusso\",\"full_name\":\"David Larusso\"},\"address\":{\"address_line_1\":\"123 Townsend St\",\"address_line_2\":\"Floor 6\",\"admin_area_2\":\"San Francisco\",\"admin_area_1\":\"CA\",\"postal_code\":\"94107\",\"country_code\":\"US\"},\"phones\":[{\"country_code\":\"001\",\"national_number\":\"4085551234\",\"phone_type\":\"MOBILE\"}],\"website\":\"www.example.com\",\"tax_id\":\"XX-XXXXXXX\",\"additional_notes\":\"<Any additional information. Includes business hours.>\",\"logo_url\":\"https://example.com/logo.png\"},\"primary_recipients\":[{\"billing_info\":{\"name\":{\"given_name\":\"Stephanie\",\"surname\":\"Meyers\",\"full_name\":\"Stephanie Meyers\"},\"address\":{\"address_line_1\":\"1234 Main Street\",\"admin_area_2\":\"Anytown\",\"admin_area_1\":\"CA\",\"postal_code\":\"98765\",\"country_code\":\"US\"},\"email_address\":\"foobuyer@example.com\"},\"shipping_info\":{\"name\":{\"given_name\":\"Stephanie\",\"surname\":\"Meyers\",\"full_name\":\"Stephanie Meyers\"},\"address\":{\"address_line_1\":\"1234 Main Street\",\"admin_area_2\":\"Anytown\",\"admin_area_1\":\"CA\",\"postal_code\":\"98765\",\"country_code\":\"US\"}}}],\"items\":[{\"id\":\"ITEM-4M535543K7257150H\",\"name\":\"Yoga Mat\",\"description\":\"Elastic mat to practice yoga.\",\"quantity\":\"1\",\"unit_amount\":{\"currency_code\":\"USD\",\"value\":\"50.00\"},\"tax\":{\"id\":\"TAX-1R2044969B8060438\",\"name\":\"Sales Tax\",\"percent\":\"7.25\",\"amount\":{\"currency_code\":\"USD\",\"value\":\"3.27\"}},\"discount\":{\"percent\":\"5\",\"amount\":{\"currency_code\":\"USD\",\"value\":\"-2.50\"}},\"unit_of_measure\":\"QUANTITY\"},{\"id\":\"ITEM-0SE42747HP857643T\",\"name\":\"Yoga t-shirt\",\"quantity\":\"1\",\"unit_amount\":{\"currency_code\":\"USD\",\"value\":\"10.00\"},\"tax\":{\"id\":\"TAX-1R2044969B8060438\",\"name\":\"Sales Tax\",\"percent\":\"7.25\",\"amount\":{\"currency_code\":\"USD\",\"value\":\"0.34\"}},\"discount\":{\"amount\":{\"currency_code\":\"USD\",\"value\":\"-5.00\"}},\"unit_of_measure\":\"QUANTITY\"}],\"configuration\":{\"tax_calculated_after_discount\":true,\"tax_inclusive\":false,\"allow_tip\":true,\"partial_payment\":{\"allow_partial_payment\":true,\"minimum_amount_due\":{\"currency_code\":\"USD\",\"value\":\"20.00\"}},\"allow_only_pay_by_bank\":false,\"template_id\":\"TEMP-0P400848HY4308238\"},\"amount\":{\"breakdown\":{\"item_total\":{\"currency_code\":\"USD\",\"value\":\"60.00\"},\"discount\":{\"invoice_discount\":{\"percent\":\"5\",\"amount\":{\"currency_code\":\"USD\",\"value\":\"-2.63\"}},\"item_discount\":{\"currency_code\":\"USD\",\"value\":\"-7.50\"}},\"tax_total\":{\"currency_code\":\"USD\",\"value\":\"4.34\"},\"shipping\":{\"amount\":{\"currency_code\":\"USD\",\"value\":\"10.00\"},\"tax\":{\"id\":\"TAX-1R2044969B8060438\",\"name\":\"Sales Tax\",\"percent\":\"7.25\",\"amount\":{\"currency_code\":\"USD\",\"value\":\"0.73\"}}},\"custom\":{\"label\":\"Packing Charges\",\"amount\":{\"currency_code\":\"USD\",\"value\":\"10.00\"}}},\"currency_code\":\"USD\",\"value\":\"74.21\"},\"due_amount\":{\"currency_code\":\"USD\",\"value\":\"74.21\"},\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-NS4E-L7P4-RZ6B-KNZY\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-NS4E-L7P4-RZ6B-KNZY/send\",\"rel\":\"send\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-NS4E-L7P4-RZ6B-KNZY\",\"rel\":\"replace\",\"method\":\"PUT\"},{\"href\":\"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-NS4E-L7P4-RZ6B-KNZY\",\"rel\":\"delete\",\"method\":\"DELETE\"},{\"href\":\"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-NS4E-L7P4-RZ6B-KNZY/payments\",\"rel\":\"record-payment\",\"method\":\"POST\"}],\"unilateral\":false}",
"headers": {
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"Cache-Control": "max-age=0, no-cache, no-store, must-revalidate",
"Vary": "Accept-Encoding",
"Content-Type": "application/json"
}
},
"persistent": true
},
{
"id": "2791b6fe-bbbe-4102-a3fd-721fb9ba1557",
"name": "Create v2 invoicing invoices",
"request": {
"urlPathTemplate": "/v2/invoicing/invoices",
"method": "POST",
"bodyPatterns": [
{
"equalToJson": "{\n \"detail\": {\n \"invoice_number\": \"17494664982\",\n \"invoice_date\": \"2022-02-04\",\n \"payment_term\": {\n \"term_type\": \"NET_10\",\n \"due_date\": \"2022-02-14\"\n },\n \"currency_code\": \"USD\",\n \"reference\": \"<The reference data. Includes a post office (PO) number.>\",\n \"note\": \"<A note to the invoice recipient. Also appears on the invoice notification email.>\",\n \"terms_and_conditions\": \"<The general terms of the invoice. Can include return or cancellation policy and other terms and conditions.>\",\n \"memo\": \"<A private bookkeeping note for merchant.>\"\n },\n \"invoicer\": {\n \"name\": {\n \"given_name\": \"David\",\n \"surname\": \"Larusso\"\n },\n \"address\": {\n \"address_line_1\": \"123 Townsend St\",\n \"address_line_2\": \"Floor 6\",\n \"admin_area_2\": \"San Francisco\",\n \"admin_area_1\": \"CA\",\n \"postal_code\": \"94107\",\n \"country_code\": \"US\"\n },\n \"phones\": [\n {\n \"country_code\": \"001\",\n \"national_number\": \"4085551234\",\n \"phone_type\": \"MOBILE\"\n }\n ],\n \"website\": \"www.example.com\",\n \"tax_id\": \"XX-XXXXXXX\",\n \"logo_url\": \"https://example.com/logo.png\",\n \"additional_notes\": \"<Any additional information. Includes business hours.>\"\n },\n \"primary_recipients\": [\n {\n \"billing_info\": {\n \"name\": {\n \"given_name\": \"Stephanie\",\n \"surname\": \"Meyers\"\n },\n \"address\": {\n \"address_line_1\": \"1234 Main Street\",\n \"admin_area_2\": \"Anytown\",\n \"admin_area_1\": \"CA\",\n \"postal_code\": \"98765\",\n \"country_code\": \"US\"\n },\n \"email_address\": \"foobuyer@example.com\",\n \"phones\": [\n {\n \"country_code\": \"001\",\n \"national_number\": \"4884551234\",\n \"phone_type\": \"HOME\"\n }\n ],\n \"additional_info_value\": \"add-info\"\n },\n \"shipping_info\": {\n \"name\": {\n \"given_name\": \"Stephanie\",\n \"surname\": \"Meyers\"\n },\n \"address\": {\n \"address_line_1\": \"1234 Main Street\",\n \"admin_area_2\": \"Anytown\",\n \"admin_area_1\": \"CA\",\n \"postal_code\": \"98765\",\n \"country_code\": \"US\"\n }\n }\n }\n ],\n \"items\": [\n {\n \"name\": \"Yoga Mat\",\n \"description\": \"Elastic mat to practice yoga.\",\n \"quantity\": \"1\",\n \"unit_amount\": {\n \"currency_code\": \"USD\",\n \"value\": \"50.00\"\n },\n \"tax\": {\n \"name\": \"Sales Tax\",\n \"percent\": \"7.25\"\n },\n \"discount\": {\n \"percent\": \"5\"\n },\n \"unit_of_measure\": \"QUANTITY\"\n },\n {\n \"name\": \"Yoga t-shirt\",\n \"quantity\": \"1\",\n \"unit_amount\": {\n \"currency_code\": \"USD\",\n \"value\": \"10.00\"\n },\n \"tax\": {\n \"name\": \"Sales Tax\",\n \"percent\": \"7.25\"\n },\n \"discount\": {\n \"amount\": {\n \"currency_code\": \"USD\",\n \"value\": \"5.00\"\n }\n },\n \"unit_of_measure\": \"QUANTITY\"\n }\n ],\n \"configuration\": {\n \"partial_payment\": {\n \"allow_partial_payment\": true,\n \"minimum_amount_due\": {\n \"currency_code\": \"USD\",\n \"value\": \"20.00\"\n }\n },\n \"allow_tip\": true,\n \"tax_calculated_after_discount\": true,\n \"tax_inclusive\": false\n },\n \"amount\": {\n \"breakdown\": {\n \"custom\": {\n \"label\": \"Packing Charges\",\n \"amount\": {\n \"currency_code\": \"USD\",\n \"value\": \"10.00\"\n }\n },\n \"shipping\": {\n \"amount\": {\n \"currency_code\": \"USD\",\n \"value\": \"10.00\"\n },\n \"tax\": {\n \"name\": \"Sales Tax\",\n \"percent\": \"7.25\"\n }\n },\n \"discount\": {\n \"invoice_discount\": {\n \"percent\": \"5\"\n }\n }\n }\n }\n}",
"ignoreArrayOrder": true,
"ignoreExtraElements": true
}
]
},
"response": {
"status": 201,
"body": "{\"id\":\"INV2-NS4E-L7P4-RZ6B-KNZY\",\"status\":\"DRAFT\",\"detail\":{\"reference\":\"<The reference data. Includes a post office (PO) number.>\",\"currency_code\":\"USD\",\"note\":\"<A note to the invoice recipient. Also appears on the invoice notification email.>\",\"terms_and_conditions\":\"<The general terms of the invoice. Can include return or cancellation policy and other terms and conditions.>\",\"memo\":\"<A private bookkeeping note for merchant.>\",\"additional_data\":\"<Any additional information. Includes business hours.>\",\"category_code\":\"SHIPPABLE\",\"invoice_number\":\"17494664982\",\"invoice_date\":\"2022-02-04\",\"payment_term\":{\"term_type\":\"NET_10\",\"due_date\":\"2022-02-14\"},\"viewed_by_recipient\":false,\"group_draft\":false,\"metadata\":{\"create_time\":\"2025-06-09T10:54:58Z\",\"last_update_time\":\"2025-06-09T10:54:58Z\",\"created_by_flow\":\"REGULAR_SINGLE\",\"recipient_view_url\":\"https://www.sandbox.paypal.com/invoice/p/#NS4EL7P4RZ6BKNZY\",\"invoicer_view_url\":\"https://www.sandbox.paypal.com/invoice/details/INV2-NS4E-L7P4-RZ6B-KNZY\",\"caller_type\":\"API_V2_INVOICE\",\"spam_info\":{}},\"archived\":false},\"invoicer\":{\"name\":{\"given_name\":\"David\",\"surname\":\"Larusso\",\"full_name\":\"David Larusso\"},\"address\":{\"address_line_1\":\"123 Townsend St\",\"address_line_2\":\"Floor 6\",\"admin_area_2\":\"San Francisco\",\"admin_area_1\":\"CA\",\"postal_code\":\"94107\",\"country_code\":\"US\"},\"phones\":[{\"country_code\":\"001\",\"national_number\":\"4085551234\",\"phone_type\":\"MOBILE\"}],\"website\":\"www.example.com\",\"tax_id\":\"XX-XXXXXXX\",\"additional_notes\":\"<Any additional information. Includes business hours.>\",\"logo_url\":\"https://example.com/logo.png\"},\"primary_recipients\":[{\"billing_info\":{\"name\":{\"given_name\":\"Stephanie\",\"surname\":\"Meyers\",\"full_name\":\"Stephanie Meyers\"},\"address\":{\"address_line_1\":\"1234 Main Street\",\"admin_area_2\":\"Anytown\",\"admin_area_1\":\"CA\",\"postal_code\":\"98765\",\"country_code\":\"US\"},\"email_address\":\"foobuyer@example.com\"},\"shipping_info\":{\"name\":{\"given_name\":\"Stephanie\",\"surname\":\"Meyers\",\"full_name\":\"Stephanie Meyers\"},\"address\":{\"address_line_1\":\"1234 Main Street\",\"admin_area_2\":\"Anytown\",\"admin_area_1\":\"CA\",\"postal_code\":\"98765\",\"country_code\":\"US\"}}}],\"items\":[{\"id\":\"ITEM-4M535543K7257150H\",\"name\":\"Yoga Mat\",\"description\":\"Elastic mat to practice yoga.\",\"quantity\":\"1\",\"unit_amount\":{\"currency_code\":\"USD\",\"value\":\"50.00\"},\"tax\":{\"id\":\"TAX-1R2044969B8060438\",\"name\":\"Sales Tax\",\"percent\":\"7.25\",\"amount\":{\"currency_code\":\"USD\",\"value\":\"3.27\"}},\"discount\":{\"percent\":\"5\",\"amount\":{\"currency_code\":\"USD\",\"value\":\"-2.50\"}},\"unit_of_measure\":\"QUANTITY\"},{\"id\":\"ITEM-0SE42747HP857643T\",\"name\":\"Yoga t-shirt\",\"quantity\":\"1\",\"unit_amount\":{\"currency_code\":\"USD\",\"value\":\"10.00\"},\"tax\":{\"id\":\"TAX-1R2044969B8060438\",\"name\":\"Sales Tax\",\"percent\":\"7.25\",\"amount\":{\"currency_code\":\"USD\",\"value\":\"0.34\"}},\"discount\":{\"amount\":{\"currency_code\":\"USD\",\"value\":\"-5.00\"}},\"unit_of_measure\":\"QUANTITY\"}],\"configuration\":{\"tax_calculated_after_discount\":true,\"tax_inclusive\":false,\"allow_tip\":true,\"partial_payment\":{\"allow_partial_payment\":true,\"minimum_amount_due\":{\"currency_code\":\"USD\",\"value\":\"20.00\"}},\"allow_only_pay_by_bank\":false,\"template_id\":\"TEMP-0P400848HY4308238\"},\"amount\":{\"breakdown\":{\"item_total\":{\"currency_code\":\"USD\",\"value\":\"60.00\"},\"discount\":{\"invoice_discount\":{\"percent\":\"5\",\"amount\":{\"currency_code\":\"USD\",\"value\":\"-2.63\"}},\"item_discount\":{\"currency_code\":\"USD\",\"value\":\"-7.50\"}},\"tax_total\":{\"currency_code\":\"USD\",\"value\":\"4.34\"},\"shipping\":{\"amount\":{\"currency_code\":\"USD\",\"value\":\"10.00\"},\"tax\":{\"id\":\"TAX-1R2044969B8060438\",\"name\":\"Sales Tax\",\"percent\":\"7.25\",\"amount\":{\"currency_code\":\"USD\",\"value\":\"0.73\"}}},\"custom\":{\"label\":\"Packing Charges\",\"amount\":{\"currency_code\":\"USD\",\"value\":\"10.00\"}}},\"currency_code\":\"USD\",\"value\":\"74.21\"},\"due_amount\":{\"currency_code\":\"USD\",\"value\":\"74.21\"},\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-NS4E-L7P4-RZ6B-KNZY\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-NS4E-L7P4-RZ6B-KNZY/send\",\"rel\":\"send\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-NS4E-L7P4-RZ6B-KNZY\",\"rel\":\"replace\",\"method\":\"PUT\"},{\"href\":\"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-NS4E-L7P4-RZ6B-KNZY\",\"rel\":\"delete\",\"method\":\"DELETE\"},{\"href\":\"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-NS4E-L7P4-RZ6B-KNZY/payments\",\"rel\":\"record-payment\",\"method\":\"POST\"}],\"unilateral\":false}",
"headers": {
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"Cache-Control": "max-age=0, no-cache, no-store, must-revalidate",
"Vary": "Accept-Encoding",
"Location": "https://api-m.sandbox.paypal.com:8443/v2/invoicing/invoices/INV2-NS4E-L7P4-RZ6B-KNZY",
"Content-Type": "application/json"
}
},
"persistent": true
}
]
}'
Assistant
Responses are generated using AI and may contain mistakes.