Revenues


revenue.get

Requests the details of one or more revenues. When no filter is set, 10 revenues will be delivered. A LIMIT up to 100 revenues is possible. The RESPONSE contains a "list of revenues" and each of them with the following fields.


FILTER
TagsDescription
See action invoice.get

RESPONSE
TagsDescription
INVOICE_ID Invoice ID
TYPE

Invoices of a specific type:

outgoingOutgoing invoices
draftDrafts
creditCredit notes
SUBTYPE

Invoice subtype:

standardStandard invoice
progress_invoiceProgress invoice
final_invoiceFinal invoice

For progress_invoice and final_invoice with a predecessor, PREVIOUS_INVOICE_ID must be set.

CUSTOMER_ID A specific customer ID
CUSTOMER_NUMBER The own customer number
CUSTOMER_COSTCENTER_ID ID of cost center
CONTACT_ID Contact ID
PROJECT_ID A specific project ID
CURRENCY_CODE Currency of the document (ISO 4217 code)
BASE_CURRENCY_CODE

Base currency that EXCHANGE_RATE refers to (ISO 4217 code)

EXCHANGE_RATE

Stored exchange rate between the document currency (CURRENCY_CODE) and the base currency (BASE_CURRENCY_CODE). Amount in base currency = amount ÷ EXCHANGE_RATE.

Is 1 if document currency and base currency are identical.

DELIVERY_DATE Delivery date
INVOICE_TITLE Invoice title
CASH_DISCOUNT_PERCENT Cash discount in percent
CASH_DISCOUNT_DAYS Period for cash discount in days
SUB_TOTAL Net amount
VAT_TOTAL Input VAT amount
VAT_CASE Flag for Intra-community delivery: 0 = no | 1 = yes
VAT_ITEMS List of all articles for one entity
ITEMS List of items
TOTAL Gross amount
IS_GROSS Gross flag, unit prices are gross prices: 0 = no | 1 = yes
ORGANIZATION Company name [REQUIRED] when customer_type = business
NOTE Note
SALUTATION Salutation: mr | mrs | family | "empty"
FIRST_NAME First name
LAST_NAME Last name
ADDRESS Address
ADDRESS_2 Address 2
ZIPCODE ZIP code
CITY City
SERVICE_PERIOD_START Start date of service period (Format: YYYY-MM-DD)
SERVICE_PERIOD_END End date of service period (Format: YYYY-MM-DD)
PAYMENT_TYPE Payment type : 1 = transfer | 2 = direct debit | 3 = cash | 4 = paypal | 5 = advanced payment | 6 = credit card
BANK_NAME Bank name
BANK_ACCOUNT_NUMBER Bank account number
BANK_CODE Bank code
BANK_ACCOUNT_OWNER Bank account owner
BANK_IBAN IBAN
BANK_BIC BIC
COMMENTS List of comments associated to the entity. Only present if at least one comment exists.
CUSTOMER_ACCOUNTING_NOTE Customer accounting note
CONTRACT_REFERENCE Contract reference
CUSTOMER_ORDER_REFERENCE Customer order reference
ORDER_REFERENCE Sales order reference
COUNTRY_CODE A country (ISO 3166 ALPHA-2)
VAT_ID VAT identification number
TEMPLATE_ID Template ID
INVOICE_NUMBER Invoice number
INTROTEXT Introduction text
PAID_DATE Date of received payment (Format: YYYY-MM-DD)
IS_CANCELED Flag for canceled status: 0 = no | 1 = yes
INVOICE_DATE Invoice date (Format: YYYY-MM-DD)
DUE_DATE Due date (Format: YYYY-MM-DD)
PAYMENT_INFO Information on payment
PAYMENTS List of payments associated to the entity
LASTUPDATE Date of latest update
DOCUMENT_URL URL of a document
PREVIOUS_INVOICE_ID ID of the predecessor invoice in the invoice chain. Must reference a progress invoice (SUBTYPE progress_invoice) and requires SUBTYPE progress_invoice or final_invoice. Customer, VAT case, gross flag and currency must match within the chain; values not sent are inherited from the predecessor invoice. 0 = no predecessor invoice
NEXT_INVOICE_ID ID of the successor invoice in the invoice chain. 0 = no successor invoice

revenue.create

Creates a revenue entry. You can optionally attach a file with the request.

ATTENTION! – If an attachment is to be transferred, a POST- request of the type „multipart/form-data“ is required. In this case, the request-body has to contain the following parts:

  • document -> Data, that is to be transferred
  • httpbody -> XML- oder JSON-datablock

Structure of POST-requests in Multipart-form:

curl -v -X POST \
-u {E-Mail-Adresse}:{API-Key} \
-H 'Content-Type: multipart/form-data, boundary=AaB03x' \
-d '{xml body}' \ https://my.fastbill.com/api/1.0/api.php

POST /api/1.0/api.php HTTP/1.0
Host: my.fastbill.com
Content-type: multipart/form-data, boundary=AaB03x
Content-Length: {Größe des Inhalts}

--AaB03x content-disposition: form-data; name="httpbody"
{XML- oder JSON-Daten}
--AaB03x
content-disposition: form-data; name="document"; filename{Dateiname}"
Content-Type: {MIME Typ}
Content-Transfer-Encoding: binary
{Datei-Inhalt}
--AaB03x--

DATA
TagsDescription
INVOICE_DATE Required Invoice date (Format: YYYY-MM-DD)
DUE_DATE Due date (Format: YYYY-MM-DD)
CUSTOMER_ID Required A specific customer ID
PROJECT_ID A specific project ID
INVOICE_NUMBER Invoice number
COMMENT Comment
SUB_TOTAL Required Net amount
VAT_TOTAL Input VAT amount
CURRENCY_CODE Currency of the document (ISO 4217 code)
ITEMS List of items

RESPONSE
TagsDescription
STATUS Result of the action
INVOICE_ID Invoice ID

revenue.setpaid

Mark a revenue as "paid"


DATA
TagsDescription
INVOICE_ID Required Invoice ID
PAID_DATE Date of received payment (Format: YYYY-MM-DD)

RESPONSE
TagsDescription
STATUS Result of the action
INVOICE_NUMBER Invoice number

revenue.delete

Delete a revenue entry.


DATA
TagsDescription
INVOICE_ID Required Invoice ID

RESPONSE
TagsDescription
STATUS Result of the action
support@fastbill.com
© 2021 FastBill GmbH