AppDirect Invoice API
The Invoice API from AppDirect — 5 operation(s) for invoice.
The Invoice API from AppDirect — 5 operation(s) for invoice.
openapi: 3.0.0
info:
description: The Companies API allows developers to manage marketplace companies and their user memberships.
title: Companies AI Embed Invoice API
license:
name: Apache License, Version 2.0
url: http://www.apache.org/licenses/LICENSE-2.0
version: v296.0-SNAPSHOT
servers:
- url: https://marketplace.appdirect.com/api
- url: https://virtserver.swaggerhub.com
tags:
- name: Invoice
x-displayName: Invoices
paths:
/billing/v1/companies/{companyId}/users/{userId}/invoices:
get:
description: List all of the invoices for the given user
tags:
- Invoice
summary: List all invoices for a user
operationId: resource_Other_readUserInvoices_GET
parameters:
- description: User's company UUID
name: companyId
in: path
required: true
schema:
type: string
- description: User UUID
name: userId
in: path
required: true
schema:
type: string
- description: Number of results to fetch. Used for paging.
name: count
in: query
schema:
type: integer
default: 250
- description: Exclude invoices with no charges (free)
name: excludeFree
in: query
schema:
type: boolean
- description: From date
name: fromDate
in: query
schema:
type: number
- description: Sort field
name: sortField
in: query
schema:
type: string
enum:
- DATE
- INVOICE_ID
- TOTAL
default: INVOICE_ID
- description: Sort order
name: sortOrder
in: query
schema:
type: string
enum:
- ASC
- DESC
default: ASC
- description: First result index. Used for paging.
name: start
in: query
schema:
type: integer
default: 0
- description: Invoice status
name: status
in: query
schema:
type: string
enum:
- CARRIED
- PAID
- UNPAID
- VOIDED
- description: To date
name: toDate
in: query
schema:
type: number
responses:
'200':
headers:
X-Total-Count:
schema:
type: integer
description: OK
content:
application/xml:
schema:
description: OK
type: array
items:
$ref: '#/components/schemas/InvoiceListingWS'
application/json:
schema:
description: OK
type: array
items:
$ref: '#/components/schemas/InvoiceListingWS'
examples:
response:
value:
- invoiceId: 20
referenceNumber: null
creationDate: 1481002410613
dueDate: 1481353200000
status: PAID
total: 10
orderIds:
- '2030'
currency: USD
user:
id: a18c91e8-d5d5-4fb8-915c-726535a0bc8a
href: http://appdirect/api/account/v1/users/a18c91e8-d5d5-4fb8-915c-726535a0bc8a
company:
id: 644eb32e-4afa-4699-9dae-5d3394320968
href: http://appdirect/api/account/v1/companies/644eb32e-4afa-4699-9dae-5d3394320968
links:
- rel: user
href: http://appdirect/api/account/v2/users/a18c91e8-d5d5-4fb8-915c-726535a0bc8a
- rel: company
href: http://appdirect/api/account/v2/companies/644eb32e-4afa-4699-9dae-5d3394320968
- rel: self
href: http://appdirect/api/billing/v1/invoices/20
headers:
examples:
response:
value:
X-Total-Count: 1
'404':
description: Not Found
x-codeSamples:
- lang: Shell + Curl
source: "curl --request GET \\\n --url 'https://marketplace.appdirect.com/api/billing/v1/companies/%7BcompanyId%7D/users/%7BuserId%7D/invoices?count=SOME_INTEGER_VALUE&excludeFree=SOME_BOOLEAN_VALUE&fromDate=SOME_NUMBER_VALUE&sortField=SOME_STRING_VALUE&sortOrder=SOME_STRING_VALUE&start=SOME_INTEGER_VALUE&status=SOME_STRING_VALUE&toDate=SOME_NUMBER_VALUE'"
- lang: Node + Request
source: "const request = require('request');\n\nconst options = {\n method: 'GET',\n url: 'https://marketplace.appdirect.com/api/billing/v1/companies/%7BcompanyId%7D/users/%7BuserId%7D/invoices',\n qs: {\n count: 'SOME_INTEGER_VALUE',\n excludeFree: 'SOME_BOOLEAN_VALUE',\n fromDate: 'SOME_NUMBER_VALUE',\n sortField: 'SOME_STRING_VALUE',\n sortOrder: 'SOME_STRING_VALUE',\n start: 'SOME_INTEGER_VALUE',\n status: 'SOME_STRING_VALUE',\n toDate: 'SOME_NUMBER_VALUE'\n }\n};\n\nrequest(options, function (error, response, body) {\n if (error) throw new Error(error);\n\n console.log(body);\n});\n"
- lang: Java + Okhttp
source: "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://marketplace.appdirect.com/api/billing/v1/companies/%7BcompanyId%7D/users/%7BuserId%7D/invoices?count=SOME_INTEGER_VALUE&excludeFree=SOME_BOOLEAN_VALUE&fromDate=SOME_NUMBER_VALUE&sortField=SOME_STRING_VALUE&sortOrder=SOME_STRING_VALUE&start=SOME_INTEGER_VALUE&status=SOME_STRING_VALUE&toDate=SOME_NUMBER_VALUE\")\n .get()\n .build();\n\nResponse response = client.newCall(request).execute();"
/billing/v1/companies/{companyId}/invoices:
get:
description: List all of the invoices for the given company
tags:
- Invoice
summary: List all invoices for a company
operationId: resource_Other_readCompanyInvoices_GET
parameters:
- description: Company UUID
name: companyId
in: path
required: true
schema:
type: string
- description: Number of results to fetch. Used for paging.
name: count
in: query
schema:
type: integer
default: 250
- description: Exclude invoices with no charges (free)
name: excludeFree
in: query
schema:
type: boolean
- description: From date
name: fromDate
in: query
schema:
type: number
- description: Sort field
name: sortField
in: query
schema:
type: string
enum:
- DATE
- INVOICE_ID
- TOTAL
default: INVOICE_ID
- description: Sort order
name: sortOrder
in: query
schema:
type: string
enum:
- ASC
- DESC
default: DESC
- description: First result index. Used for paging.
name: start
in: query
schema:
type: integer
default: 0
- description: Invoice status
name: status
in: query
schema:
type: string
enum:
- CARRIED
- PAID
- UNPAID
- VOIDED
- description: To date
name: toDate
in: query
schema:
type: number
responses:
'200':
description: OK
content:
application/json:
schema:
description: OK
type: array
items:
$ref: '#/components/schemas/InvoiceListingWS'
examples:
response:
value:
- invoiceId: 20
referenceNumber: null
creationDate: 1481002410613
dueDate: 1481353200000
status: PAID
total: 10
orderIds:
- '2030'
currency: USD
user:
id: a18c91e8-d5d5-4fb8-915c-726535a0bc8a
href: http://appdirect/api/account/v1/users/a18c91e8-d5d5-4fb8-915c-726535a0bc8a
company:
id: 644eb32e-4afa-4699-9dae-5d3394320968
href: http://appdirect/api/account/v1/companies/644eb32e-4afa-4699-9dae-5d3394320968
links:
- rel: user
href: http://appdirect/api/account/v2/users/a18c91e8-d5d5-4fb8-915c-726535a0bc8a
- rel: company
href: http://appdirect/api/account/v2/companies/644eb32e-4afa-4699-9dae-5d3394320968
- rel: self
href: http://appdirect/api/billing/v1/invoices/20
application/xml:
schema:
description: OK
type: array
items:
$ref: '#/components/schemas/InvoiceListingWS'
'404':
description: Not Found
x-codeSamples:
- lang: Shell + Curl
source: "curl --request GET \\\n --url 'https://marketplace.appdirect.com/api/billing/v1/companies/%7BcompanyId%7D/invoices?count=SOME_INTEGER_VALUE&excludeFree=SOME_BOOLEAN_VALUE&fromDate=SOME_NUMBER_VALUE&sortField=SOME_STRING_VALUE&sortOrder=SOME_STRING_VALUE&start=SOME_INTEGER_VALUE&status=SOME_STRING_VALUE&toDate=SOME_NUMBER_VALUE'"
- lang: Node + Request
source: "const request = require('request');\n\nconst options = {\n method: 'GET',\n url: 'https://marketplace.appdirect.com/api/billing/v1/companies/%7BcompanyId%7D/invoices',\n qs: {\n count: 'SOME_INTEGER_VALUE',\n excludeFree: 'SOME_BOOLEAN_VALUE',\n fromDate: 'SOME_NUMBER_VALUE',\n sortField: 'SOME_STRING_VALUE',\n sortOrder: 'SOME_STRING_VALUE',\n start: 'SOME_INTEGER_VALUE',\n status: 'SOME_STRING_VALUE',\n toDate: 'SOME_NUMBER_VALUE'\n }\n};\n\nrequest(options, function (error, response, body) {\n if (error) throw new Error(error);\n\n console.log(body);\n});\n"
- lang: Java + Okhttp
source: "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://marketplace.appdirect.com/api/billing/v1/companies/%7BcompanyId%7D/invoices?count=SOME_INTEGER_VALUE&excludeFree=SOME_BOOLEAN_VALUE&fromDate=SOME_NUMBER_VALUE&sortField=SOME_STRING_VALUE&sortOrder=SOME_STRING_VALUE&start=SOME_INTEGER_VALUE&status=SOME_STRING_VALUE&toDate=SOME_NUMBER_VALUE\")\n .get()\n .build();\n\nResponse response = client.newCall(request).execute();"
/billing/v1/invoices/{invoiceNumber}/payments:
get:
description: List all payment data for an invoice
tags:
- Invoice
summary: List All Invoice Payments
operationId: resource_Other_readInvoicePayments_GET
parameters:
- description: Invoice number.
name: invoiceNumber
in: path
required: true
schema:
type: integer
- description: Number of results to fetch. Used for paging.
name: count
in: query
schema:
type: string
default: '250'
- description: From date.
name: fromDate
in: query
schema:
type: number
- description: Payment method.
name: method
in: query
schema:
type: string
enum:
- ADP_INVOICE
- ARIBAPAY
- BT_BILL
- CLICKANDBUY
- CLOUDFOUNDRY
- CREDIT_CARD
- CUMULA_BILL
- DTAG
- EXTERNAL_INVOICE
- KREDITKARTE
- LASTSCHRIFT_MRNEXNET
- MANO_TEO_BILL
- MANUAL
- MARKETPLACE_CREDITS
- NETS_ARVATO_INVOICE
- NEXTEL
- PAYPAL
- ROGERS_CC_DTMF
- ROGERS_CC_POS
- SNAP
- TBILL
- THISTLE
- TOICLEARING
- description: Payment result.
name: result
in: query
schema:
type: string
enum:
- FAILED
- GATEWAY_NOT_AVAILABLE
- MANUAL
- SUCCESSFUL
- description: Sort field.
name: sortField
in: query
schema:
type: string
enum:
- AMOUNT
- DATE
- PAYMENT_ID
default: PAYMENT_ID
- description: Sort order.
name: sortOrder
in: query
schema:
type: string
enum:
- ASC
- DESC
default: ASC
- description: First result index. Used for paging.
name: start
in: query
schema:
type: string
default: '0'
- description: To date.
name: toDate
in: query
schema:
type: number
responses:
'200':
description: OK
content:
application/json:
schema:
description: OK
type: array
items:
$ref: '#/components/schemas/PaymentWS'
examples:
response:
value:
- paymentNumber: 2
date: 1481003382652
amount: 10
currency: USD
result: SUCCESSFUL
method: CREDIT_CARD
transactionId: 123456abcdef
user:
id: 72ae0d01-8036-4203-95c0-4c2fb424ff6d
href: http://appdirect/api/account/v1/users/72ae0d01-8036-4203-95c0-4c2fb424ff6d
company:
id: 5aae5a52-cec3-4cb2-87b4-6352624d2a31
href: http://appdirect/api/account/v1/companies/5aae5a52-cec3-4cb2-87b4-6352624d2a31
gatewayResponse:
avs: true
cvv: true
code: null
message: null
links:
- rel: self
href: http://appdirect/api/billing/v1/payments/2
application/xml:
schema:
description: OK
type: array
items:
$ref: '#/components/schemas/PaymentWS'
'204':
description: No Content
content:
application/json:
schema:
description: No Content
type: array
items:
$ref: '#/components/schemas/PaymentWS'
application/xml:
schema:
description: No Content
type: array
items:
$ref: '#/components/schemas/PaymentWS'
'401':
description: Unauthorized
'404':
description: Not Found
x-codeSamples:
- lang: Shell + Curl
source: "curl --request GET \\\n --url 'https://marketplace.appdirect.com/api/billing/v1/invoices/%7BinvoiceNumber%7D/payments?count=SOME_STRING_VALUE&fromDate=SOME_NUMBER_VALUE&method=SOME_STRING_VALUE&result=SOME_STRING_VALUE&sortField=SOME_STRING_VALUE&sortOrder=SOME_STRING_VALUE&start=SOME_STRING_VALUE&toDate=SOME_NUMBER_VALUE'"
- lang: Node + Request
source: "const request = require('request');\n\nconst options = {\n method: 'GET',\n url: 'https://marketplace.appdirect.com/api/billing/v1/invoices/%7BinvoiceNumber%7D/payments',\n qs: {\n count: 'SOME_STRING_VALUE',\n fromDate: 'SOME_NUMBER_VALUE',\n method: 'SOME_STRING_VALUE',\n result: 'SOME_STRING_VALUE',\n sortField: 'SOME_STRING_VALUE',\n sortOrder: 'SOME_STRING_VALUE',\n start: 'SOME_STRING_VALUE',\n toDate: 'SOME_NUMBER_VALUE'\n }\n};\n\nrequest(options, function (error, response, body) {\n if (error) throw new Error(error);\n\n console.log(body);\n});\n"
- lang: Java + Okhttp
source: "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://marketplace.appdirect.com/api/billing/v1/invoices/%7BinvoiceNumber%7D/payments?count=SOME_STRING_VALUE&fromDate=SOME_NUMBER_VALUE&method=SOME_STRING_VALUE&result=SOME_STRING_VALUE&sortField=SOME_STRING_VALUE&sortOrder=SOME_STRING_VALUE&start=SOME_STRING_VALUE&toDate=SOME_NUMBER_VALUE\")\n .get()\n .build();\n\nResponse response = client.newCall(request).execute();"
post:
description: If the invoice is unpaid, will process the payment and return the result. Will return an exception otherwise
tags:
- Invoice
summary: Pay an Invoice
operationId: resource_Other_payInvoice_POST
parameters:
- description: The unique identifier for the invoice provided by the channel.
name: invoiceNumber
in: path
required: true
schema:
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentWS'
application/xml:
schema:
$ref: '#/components/schemas/PaymentWS'
description: Payment data object.
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentWS'
application/xml:
schema:
$ref: '#/components/schemas/PaymentWS'
'400':
description: Bad Request
'401':
description: Unauthorized
'404':
description: Not Found
'409':
description: Conflict
x-codeSamples:
- lang: Shell + Curl
source: "curl --request POST \\\n --url https://marketplace.appdirect.com/api/billing/v1/invoices/%7BinvoiceNumber%7D/payments \\\n --header 'content-type: application/json' \\\n --data '{\"links\":[{\"href\":\"...\",\"rel\":\"...\"},{\"href\":\"...\",\"rel\":\"...\"}],\"amount\":12345,\"company\":{\"href\":\"...\",\"id\":\"...\"},\"currency\":\"INR\",\"date\":12345,\"gatewayResponse\":{\"avs\":true,\"code\":\"...\",\"cvv\":true,\"message\":\"...\"},\"id\":12345,\"method\":\"PAYPAL\",\"result\":\"GATEWAY_NOT_AVAILABLE\",\"transactionId\":\"...\",\"user\":{\"href\":\"...\",\"id\":\"...\"}}'"
- lang: Node + Request
source: "const request = require('request');\n\nconst options = {\n method: 'POST',\n url: 'https://marketplace.appdirect.com/api/billing/v1/invoices/%7BinvoiceNumber%7D/payments',\n headers: {'content-type': 'application/json'},\n body: {\n links: [{href: '...', rel: '...'}, {href: '...', rel: '...'}],\n amount: 12345,\n company: {href: '...', id: '...'},\n currency: 'INR',\n date: 12345,\n gatewayResponse: {avs: true, code: '...', cvv: true, message: '...'},\n id: 12345,\n method: 'PAYPAL',\n result: 'GATEWAY_NOT_AVAILABLE',\n transactionId: '...',\n user: {href: '...', id: '...'}\n },\n json: true\n};\n\nrequest(options, function (error, response, body) {\n if (error) throw new Error(error);\n\n console.log(body);\n});\n"
- lang: Java + Okhttp
source: "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"links\\\":[{\\\"href\\\":\\\"...\\\",\\\"rel\\\":\\\"...\\\"},{\\\"href\\\":\\\"...\\\",\\\"rel\\\":\\\"...\\\"}],\\\"amount\\\":12345,\\\"company\\\":{\\\"href\\\":\\\"...\\\",\\\"id\\\":\\\"...\\\"},\\\"currency\\\":\\\"INR\\\",\\\"date\\\":12345,\\\"gatewayResponse\\\":{\\\"avs\\\":true,\\\"code\\\":\\\"...\\\",\\\"cvv\\\":true,\\\"message\\\":\\\"...\\\"},\\\"id\\\":12345,\\\"method\\\":\\\"PAYPAL\\\",\\\"result\\\":\\\"GATEWAY_NOT_AVAILABLE\\\",\\\"transactionId\\\":\\\"...\\\",\\\"user\\\":{\\\"href\\\":\\\"...\\\",\\\"id\\\":\\\"...\\\"}}\");\nRequest request = new Request.Builder()\n .url(\"https://marketplace.appdirect.com/api/billing/v1/invoices/%7BinvoiceNumber%7D/payments\")\n .post(body)\n .addHeader(\"content-type\", \"application/json\")\n .build();\n\nResponse response = client.newCall(request).execute();"
/billing/v1/invoices:
get:
description: List all invoice data
tags:
- Invoice
summary: List All Invoices
operationId: resource_Other_readInvoices_GET
parameters:
- description: Number of results to fetch. Used for paging.
name: count
in: query
schema:
type: string
default: '250'
- description: Exclude invoices with no charges.
name: excludeFree
in: query
schema:
type: boolean
- description: From date.
name: fromDate
in: query
schema:
type: number
- description: Sort field.
name: sortField
in: query
schema:
type: string
enum:
- DATE
- INVOICE_ID
- TOTAL
default: INVOICE_ID
- description: Sort order.
name: sortOrder
in: query
schema:
type: string
enum:
- ASC
- DESC
default: ASC
- description: First result index. Used for paging.
name: start
in: query
schema:
type: string
default: '0'
- description: Invoice status.
name: status
in: query
schema:
type: string
enum:
- CARRIED
- PAID
- UNPAID
- VOIDED
- description: To date.
name: toDate
in: query
schema:
type: number
- description: Filter invoices with purchases made by user with this role.
name: buyerRole
in: query
schema:
type: string
enum:
- ALL
- CUSTOMER
- RESELLER
- SALES_SUPPORT
responses:
'200':
description: OK
content:
application/json:
schema:
description: OK
type: array
items:
$ref: '#/components/schemas/InvoiceListingWS'
examples:
response:
value:
- invoiceId: 1
referenceNumber: null
creationDate: 1481003387753
dueDate: 1481353200000
status: PAID
total: 10
orderIds:
- '2030'
currency: USD
user:
id: eefdf767-9197-4402-ba0d-614cfec17ee1
href: http://appdirect/api/account/v1/users/eefdf767-9197-4402-ba0d-614cfec17ee1
company:
id: 5a95127f-4b06-459c-bdb1-da80568de2fd
href: http://appdirect/api/account/v1/companies/5a95127f-4b06-459c-bdb1-da80568de2fd
links:
- rel: user
href: http://appdirect/api/account/v2/users/eefdf767-9197-4402-ba0d-614cfec17ee1
- rel: company
href: http://appdirect/api/account/v2/companies/5a95127f-4b06-459c-bdb1-da80568de2fd
- rel: self
href: http://appdirect/api/billing/v1/invoices/1
application/xml:
schema:
description: OK
type: array
items:
$ref: '#/components/schemas/InvoiceListingWS'
'204':
description: No Content
content:
application/json:
schema:
description: No Content
type: array
items:
$ref: '#/components/schemas/InvoiceListingWS'
application/xml:
schema:
description: No Content
type: array
items:
$ref: '#/components/schemas/InvoiceListingWS'
'401':
description: Unauthorized
'404':
description: Not Found
x-codeSamples:
- lang: Shell + Curl
source: "curl --request GET \\\n --url 'https://marketplace.appdirect.com/api/billing/v1/invoices?count=SOME_STRING_VALUE&excludeFree=SOME_BOOLEAN_VALUE&fromDate=SOME_NUMBER_VALUE&sortField=SOME_STRING_VALUE&sortOrder=SOME_STRING_VALUE&start=SOME_STRING_VALUE&status=SOME_STRING_VALUE&toDate=SOME_NUMBER_VALUE&buyerRole=SOME_STRING_VALUE'"
- lang: Node + Request
source: "const request = require('request');\n\nconst options = {\n method: 'GET',\n url: 'https://marketplace.appdirect.com/api/billing/v1/invoices',\n qs: {\n count: 'SOME_STRING_VALUE',\n excludeFree: 'SOME_BOOLEAN_VALUE',\n fromDate: 'SOME_NUMBER_VALUE',\n sortField: 'SOME_STRING_VALUE',\n sortOrder: 'SOME_STRING_VALUE',\n start: 'SOME_STRING_VALUE',\n status: 'SOME_STRING_VALUE',\n toDate: 'SOME_NUMBER_VALUE',\n buyerRole: 'SOME_STRING_VALUE'\n }\n};\n\nrequest(options, function (error, response, body) {\n if (error) throw new Error(error);\n\n console.log(body);\n});\n"
- lang: Java + Okhttp
source: "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://marketplace.appdirect.com/api/billing/v1/invoices?count=SOME_STRING_VALUE&excludeFree=SOME_BOOLEAN_VALUE&fromDate=SOME_NUMBER_VALUE&sortField=SOME_STRING_VALUE&sortOrder=SOME_STRING_VALUE&start=SOME_STRING_VALUE&status=SOME_STRING_VALUE&toDate=SOME_NUMBER_VALUE&buyerRole=SOME_STRING_VALUE\")\n .get()\n .build();\n\nResponse response = client.newCall(request).execute();"
/billing/v1/invoices/{invoiceNumber}:
get:
description: Read an invoice
tags:
- Invoice
summary: Retrieve an Invoice
operationId: resource_Other_readInvoice_GET
parameters:
- description: The unique identifier for the invoice provided by the channel.
name: invoiceNumber
in: path
required: true
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/InvoiceWS'
examples:
response:
value:
invoiceId: 1
referenceNumber: null
creationDate: 1481003386696
dueDate: 1481353200000
status: PAID
total: 10
orderIds:
- '2030'
currency: USD
user:
id: f090d591-8909-43ed-883d-71fb09ef3941
href: http://appdirect/api/account/v1/users/f090d591-8909-43ed-883d-71fb09ef3941
company:
id: ba550905-e0ea-48f2-a04f-0763e999d89c
href: http://appdirect/api/account/v1/companies/ba550905-e0ea-48f2-a04f-0763e999d89c
invoiceLines:
- id: 23
type: ITEM
itemId: null
description: Invoice Line description
quantity: 1
price: null
percentage: null
total: null
periodStart: null
periodEnd: null
paymentPlanId: 1367
editionId: 1210
productId: 788
pricingUnit: USER
delegatedToInvoice: null
includedInvoices: null
links:
- rel: user
href: http://appdirect/api/account/v2/users/f090d591-8909-43ed-883d-71fb09ef3941
- rel: company
href: http://appdirect/api/account/v2/companies/ba550905-e0ea-48f2-a04f-0763e999d89c
- rel: self
href: http://appdirect/api/billing/v1/invoices/1
application/xml:
schema:
$ref: '#/components/schemas/InvoiceWS'
'401':
description: Unauthorized
'404':
description: Not Found
x-codeSamples:
- lang: Shell + Curl
source: "curl --request GET \\\n --url https://marketplace.appdirect.com/api/billing/v1/invoices/%7BinvoiceNumber%7D"
- lang: Node + Request
source: "const request = require('request');\n\nconst options = {\n method: 'GET',\n url: 'https://marketplace.appdirect.com/api/billing/v1/invoices/%7BinvoiceNumber%7D'\n};\n\nrequest(options, function (error, response, body) {\n if (error) throw new Error(error);\n\n console.log(body);\n});\n"
- lang: Java + Okhttp
source: "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://marketplace.appdirect.com/api/billing/v1/invoices/%7BinvoiceNumber%7D\")\n .get()\n .build();\n\nResponse response = client.newCall(request).execute();"
patch:
x-appdirect-visible: false
description: Currently only used to void an invoice by updating the invoice status
tags:
- Invoice
summary: Patch method to partially update an invoice
operationId: resource_Other_patchInvoice_PATCH
parameters:
- description: The unique identifier of the invoice that should be patched.
name: invoiceNumber
in: path
required: true
schema:
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/InvoiceWS'
application/xml:
schema:
$ref: '#/components/schemas/InvoiceWS'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/InvoiceWS'
application/xml:
schema:
$ref: '#/components/schemas/InvoiceWS'
'400':
description: Bad Request
'401':
description: Unauthorized
'404':
description: Not Found
x-codeSamples:
- lang: Shell + Curl
source: "curl --request PATCH \\\n --url https://marketplace.appdirect.com/api/billing/v1/invoices/%7BinvoiceNumber%7D \\\n --header 'content-type: application/json' \\\n --data '{\"links\":[{\"href\":\"...\",\"rel\":\"...\"},{\"href\":\"...\",\"rel\":\"...\"}],\"company\":{\"href\":\"...\",\"id\":\"...\"},\"creationDate\":12345,\"currency\":\"KRW\",\"dueDate\":12345,\"invoiceId\":12345,\"referenceNumber\":\"...\",\"status\":\"VOIDED\",\"total\":12345,\"user\":{\"href\":\"...\",\"id\":\"...\"},\"orderIds\":[\"1234\"],\"delegatedToInvoice\":{\"href\":\"...\",\"id\":\"...\"},\"includedInvoices\":[{\"href\":\"...\",\"id\":\"...\"},{\"href\":\"...\",\"id\":\"...\"}],\"invoiceLines\":[{\"description\":\"...\",\"id\":12345,\"itemId\":12345,\"percentage\":12345,\"periodEnd\":12345,\"periodStart\":12345,\"price\":12345,\"quantity\":12345,\"total\":12345,\"type\":\"ITEM\"},{\"description\":\"...\",\"id\":12345,\"itemId\":12345,\"percentage\":12345,\"periodEnd\":12345,\"periodStart\":12345,\"price\":12345,\"quantity\":12345,\"total\":12345,\"type\":\"TAX\"}]}'"
- lang: Node + Request
source: "const request = require('request');\n\nconst options = {\n method: 'PATCH',\n url: 'https://marketplace.appdirect.com/api/billing/v1/invoices/%7BinvoiceNumber%7D',\n headers: {'content-type': 'application/json'},\n body: {\n links: [{href: '...', rel: '...'}, {href: '...', rel: '...'}],\n company: {href: '...', id: '...'},\n creationDate: 12345,\n currency: 'KRW',\n dueDate: 12345,\n invoiceId: 12345,\n referenceNumber: '...',\n status: 'VOIDED',\n total: 12345,\n user: {href: '...', id: '...'},\n orderIds: ['1234'],\n delegatedToInvoice: {href: '...', id: '...'},\n includedInvoices: [{href: '...', id: '...'}, {href: '...', id: '...'}],\n invoiceLines: [\n {\n description: '...',\n id: 12345,\n itemId: 12345,\n percentage: 12345,\n periodEnd: 12345,\n periodStart: 12345,\n price: 12345,\n quantity: 12345,\n to
# --- truncated at 32 KB (45 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/appdirect/refs/heads/main/openapi/appdirect-invoice-api-openapi.yml