# Vendor API v1 (deprecated)

This document describes the usage of the anybill vendor REST API.

# Bill API

With this endpoint you can add a bill to the anybill API. For this, the respective store from which the receipt is to be issued must already have been added via the Store API.

Values for quantityType and tenderTypeId can be the integer value or the string equivalent.

# Possible quantityType values

Name Value
Count 0
Kilogram 1
Lbs 2
Meters 3
Inches 4
Liter 5
CubicMeters 6
SquareMeters 7

Example:
qantityType: "Count"

Example 2:
quantityType: 3

# Possible tenderTypeId values

Name Value
CASH 0
VISA 1
MASTERCARD 2
AMERICAN_EXPRESS 3
DISCOVER 4
JCB 5
DEBITCARD 6
PAYPAL 7
APPLE_PAY 8
GOOGLE_PAY 9
AMAZON_PAY 10

Example:
tenderTypeId: "PAYPAL"

Example 2:
tenderTypeId: 8

# Possible currencyCode values:

Currency codes (ISO 4217)

Example:
currencyCode: "EUR"

# Display a discount:

A Discount can be set to each LineItem Individually with the Properties originalPrice, pricePaid and priceModifier.
By providing these Parameters the applied Discount gets calculated automatically.

Possible Values for priceModifier:

Name Value Description
None (default) 0 No Discount gets applied
Percentage 1 A Discount of a specific percentage gets applied
Monetary 2 The Line Item price is reduced by a certain Amount e.g. -2€
Monetary Replacement 3 The Line Item price is reduced to a certain Price e.g. costs 3€ instead of 4€

Example:
originalPrice: 100.0
pricePaid: 80.0
priceModifier: 1

=> a discount of 20% is applied to this line item

Example 2:
originalPrice: 2.99
pricePaid: 2.39
priceModifier: 2

=> a discount of 0.30 is applied to this line item

Example 3:
originalPrice: 14.99
pricePaid: 9.99
priceModifier: 3

=> the price of this line item is reduced from 14.99 to 9.99

# OpenAPI Specifications:

Production API:
SwaggerUI

Staging API:
SwaggerUI

# Store API

With these Endpoints the stores of an Vendor can be managed. This can also be done on the anybill Partner Portal.

# OpenAPI Specifications:

Production API:
SwaggerUI

Staging API:
SwaggerUI

# Category API

This endpoint lists all categories which are available to categorize the line items and the bill.

# OpenAPI Specifications:

Production API:
SwaggerUI

Staging API:
SwaggerUI

# Postman

A Postman collection can be found here. There are also Environments for Staging and Production

To acquire an access_token first set your credentials for the following collection variables:

  • username
  • password
  • client_id

After your credentials are set, send a request with the GetToken request. The acquired access token will automatically be set for all requests in the collection. Choose the environment and you are good to go.

# Changelog

Changes to the anybill API will be documented here.

# 2020-02-04

Bill endpoint:

  • Quantity can now be of type double
  • QuantityType added

# 2019-12-14

Initial documented pre release.

Bill endpoint:

  • AddBill

Category endpoint:

  • GetCategories
  • GetCategory

Stores:

  • GetStores
  • GetStore
  • GetStoreHistory
  • DeleteStore
  • UpsertStore