Suggest Edits

Introduction

The pages help you quickly get familuar with the Upodi as a programmer.

 

Developer - Welcome!

We love the subscription business and thank you for taking the time to review our development hub. Please do not be shy - contact us immediately if you find questions not answered - you can always have a direct chat with us using Intercom below.

Getting started quickly (cheating)

If you are impatient and want to learn by doing - follow this cheat sheet guide:
1) Create an API key
2) Configure your desired client and set the authorization header = 'bearer base64(key)'
3) Create your first customer
4) Make your first API Call :)
5) Extend the functionality using our API.

Postman Collection

You can download our postman collection for sampling here.

In need of assistance?

Upodi support can be reached 09:00 to 16:00 GMT+1, Monday - Friday. Refer to your contract for on-call support during non-working hours.

Stay up to date

Using our DeveloperNews mailing list, we inform you when news have been published. From developers, for developers. Subscribe here.

Suggest Edits

TLS 1.2 requirement

 

To comply with PCI DSS requirements by June 30th 2018, Upodi have moved API to strictly enforce TLS 1.2 from SSL/TLS. You will have to configure your integration with support of TLS 1.2.

All services consumed by Upodi have been verified for TLS 1.2.

What happens on 30 June 2018?

30th June 2018 was the deadline for disabling SSL/early TLS when working with PCI compliant data. As such, implementing a more secure encryption protocol – TLS 1.1 or higher (TLS v1.2 is strongly encouraged) in order to meet the PCI Data Security Standard (PCI DSS) for safeguarding payment data.

Read more here.

Suggest Edits

Getting started

 

Upodi is a customer & subscription management platform that supports 1.000+ business' and over 100.000 subscriptions' in 10 countries around the world. Many of these businesses use the Upodi API to automate and integrate their existing line of business (LOB) solutions.

The API

This is the documentation for the Upodi v2 API. Read the contents of this page carefully.

Upodi API is using HTTP methods and a RESTful endpoint structure, and uses HTTP response codes to indicate API errors. Format requests in JSON and the APIs return JSON-formatted responses. Upodi API do not support XML content negotiation.

A resource can support the following basic REST API actions (that are actually HTTP methods):

  • GET for retrieving the resource
  • POST for creating the resource
  • PUT for modifying the resource
  • DELETE for removing the resource

Upon updating data, the full object must be retrieved and returned. Our API does not provide property-by-property update. Issue a GET, provide changes then a PUT.

  • PATCH is not supported (property update)

We make changes to the APIs from time to time. For more information, see API Changes.

Latest Upodi API endpoint:

Requests

To perform an API action you need to make an API request. For HTTP POST and PUT method, the Upodi API accepts application/json media type.

To ensure requests are threated as JSON, please add the ACCEPT header:

Accept: application/json; charset=utf-8

In addition, you must set the CONTENT-TYPE header for every request:

Content-type: application/json; charset=utf-8

Response

An API request, that has been sent to the API service, returns an API response. All responses from the Upodi API will be in JSON. All responses will contain a unique request identifier in the HTTP headers with name Request-Id. The format is a GUID.

Suggest Edits

Versioning

To ensure compatibility this section highlights how we version the API.

 

We might change the API time over time. This is to make sure we enable as much functionality as possible for our customers.

To support continuity and stability our efforts reason to allow a version of

Current version - 2

As an example, if the new release is version 7, we will support the API version 5. The version is applied on the URL in the format v{version number} of the API endpoint, as follows:

Version of API is embedded into the URL

Suggest Edits

Authentication

 

Upodi use a token API key to allow access to the API. You will need to create this API key in Upodi. To retrieve an API key, follow these steps:

1) Sign in with an administrative account.
2) Go to Setup > Developer > API Keys.
3) Generate a new API token. API keys are generated under two scopes - READ or WRITE or both.
4) Keep the API token safe and use it only on non-customer facing code (not in Javascript or HTML).

Be careful

As you setup an API key, be sure to select either read or write access permissions. Setting Upodi.js privileges will not enable the REST API to work. See the upodi.js section below.

Once created, add the key token encoded with Base64 as an authorization header, of the HTTP request to the API. The scheme is bearer.

Authorization: bearer {base64 encoding of the API key}

All API requests must be made over HTTPS (TLS/SSL). Calls made over plain HTTP will be rejected by our security protocol and fail. Most requests require authentication.

Information

The API header must be a base64 encoding of your API token, iso-8859-1 encoding. Keep your keys secure and do not expose them. Use www.base64encode.org to test.

Our API and webhooks are currently secured using TLS 1.0. We have a [planned transition to TLS 1.2].(http://trust.upodi.com/)

Suggest Edits

Data types

 

Data is formatted consuming and producing application/json media types.

The Upodi API use several different data types to extend and express data value(s). Data types will follow these policies.

Data type policies

Data type Description Example
currencies All currencies are handled as floats. They are formatted by US numeric standard, with two digits. 490.281,90
date & time Date & time is always formatted to UTC timezone ("yyyy-MM-ddTHH:mm:ssZ"). 2015-06-15T13:45:30
numbers All numbers (integers, doubles, and floats) are formatted by US numeric standard. 3.390.281,90
guid All IDs are guid (UUID) formatted using 128 bit. Use online tool 0f9aeed3-7c54-4cae-976a-dc35ed4f09ce
Suggest Edits

Handling errors

 

Errors

Upodi use conventional HTTP response codes to indicate success or failure of an API request.

Not all errors map cleanly onto HTTP response codes, however. When a request is valid but does not complete successfully (e.g. a card is declined), we return a 402 error code.

Attributes

code

always

HTTP status code as indicated in the table to the left.

body

optional

A human-readable message in JSON format, providing more details about the error.

A summary of the HTTP status codes and what they represent is listed here.

HTTP status code summary

200 - OK

Everything worked as expected.

201 - Created

Object created. ID of object can be found in body.

204 - No content

The resource have been executed.

206 - Created

The resource have been created. You may find data in the response of the newly created entity.

400 - Bad Request

The request was unacceptable, often due to missing a required parameter.

401 - Unauthorized

No valid API key provided and/or conducting a request with a wrong scope of the provided API key.

402 - Request Failed

The parameters were valid but the request failed.

403 - Forbidden

The current API key does not provide proper access scope (READ or WRITE).

404 - Not Found

The requested resource doesn't exist.

409 - Conflict

The request conflicts with another request (perhaps due to using the same idempotent key).

422 - Unprocessable entity

Entity is likely a duplicate or already exists. Please check body for error code. Usually a response of customer if accountnumber is duplicated.

500 - 506 (server errors)

Something went wrong on our end. (These are rare but recorded and will issue a system alert to operations ).

Suggest Edits

Throtteling

 

The API is limited to return 1.000 record at a time when providing list of records. To page the results, please use the following parameters.

Option
Description

$top

Returns only the first n the results.

$skip

Skips the first n results.

$select

Selects which properties to include in the response.

$orderby

Sorts the results.

$expand

Expands related entities inline. These are arrays of objects and object properties.

$filter

Filters the output.

Read more here. Examples here.

To page a result set, use the parameters. The following example will skip the first 10 results, and take a list of 50.

GET /customers/?$skip=10&top=50 HTTP/1.1

Only list methods support paging

Example /customers/ will support paging, where-as single results like /customers/{id}/ will not.

https://api.upodi.io/v2/customers/?$select=ID,Subscriptions/ID&$expand=Subscriptions
Suggest Edits

Webhooks

Webhooks are a quick way to keep track of event.

 

Webhooks are used as a messaging channel, to keep line of business systems synchronized with events inside Upodi. A webhook cannot be used as a reliable state of an object or action. The webhook should be used for event notification in conjunction with the API.

Upodi sends webhooks to any public available webserver as HTTP POST. You can specify multiple endpoints in the Upodi application.

Upon an event, Upodi will trigger a webhook and try to send this notification to the endpoint(s). Timeout is set to 5 seconds. The webhook response is not captured by Upodi. It is a simple fire and forget event.

Summarized:

  • Enable a public available web endpoint using HTTP (port 80) or HTTPS (port 443).
  • Your endpoint must be live and capture the event within 5 seconds.
  • Upodi do not catch any response code.
  • Method is POST.
  • "Signature" will correspond to the authenticity token, and can be used to verify the source.

Webhook body
A webhook holds various information and details. Please make a sample to monitor the response formats.

This is an example of a webhook body (customer, create event):

{
  "ID" : "f07b8521-4421-4de6-96a5-178cf498cfef",
  "Time" : 131516890300860922,
  "Signature" : YTYxNWEzMdItZTBgg5i00YWE4LTk5tu6rh2JiZmEyODk5OGMz,
  "Action" :"create",
  "Issuer" : {
    "Url" : "/Customer/create/0ea627de-158e-48b1-bcbb-7fe6058d191c",
    "Identifier":"0ea627de-158e-48b1-bcbb-7fe6058d191c"
  },
  "Data" : null,
  "Type" : 
  "Customer"
}

Need to test a webhook?

Services like Webhook Site enable quick test of the webhook calls from Upodi. Setup a Webhook.site endpoint and add the URL to the Upodi webhook.

Events
The followings events are sent from Upodi, to endpoint configured under webhooks.

Object
Event
Description

Customer

create

Occurs when a customer is created. Payload is id of the newly created customer.

update

Occurs when a customer is updated. Payload is id of the updated customer.

delete

Occurs when a customer is deleted. Payload is the id of the deleted customer.

Subscription

create

Occurs when a subscription is created. Payload is id of the newly created subscription.

update

Occurs when a subscription is updated. Payload is id of the updated subscription.

delete

Occurs when a subscription is deleted. Payload is the id of the deleted subscription.

cancel

Occurs when a subscription is cancelled.

activated

Occurs when a subscription is activated.

renewing

Occurs when a subscription is set to renewing state (not subject for evergreen).

renewed

Occurs when a subscription has completed a renewal event (not subject for evergreen).

ended

Occurs when a subscription has ended.

hold

Occurs when a subscription is put on hold.

expire

Occurs when a subscription has expired.

Invoice

create

Occurs when an invoice is created. Payload is id of the newly created invoice.

update

Occurs when an invoice is updated. Payload is id of the updated invoice.

delete

Occurs when an invoice is deleted. Payload is the id of the deleted invoice.

paid

Occurs when an invoice is paid.

Transaction

create

Occurs when a transaction is created. Occurs for each transaction also during dunning, each transaction may be declined, completed etc.

Suggest Edits

Tokenized cards

 

The payment industry is going into what is called tokenization.

Tokenization is a secure approch to solve both a) high PCI standards required to operate raw credit card data. Tokenization is a way to create a reference to a credit card provided by a payment gateway provider. Tokenization, when applied to data security, is the process of substituting a sensitive data element with a non-sensitive equivalent, referred to as a token, that has no extrinsic or exploitable meaning or value for the reader.

To determine which gateway is the best, please read the following section.

Upodi support tokenization of provides as follows

Provider
Tokenization
Raw data

Stripe

Yes

No

QuickPay

Yes

No

ePay

Yes

No

AltaPay

No

No

PayLike.io

Yes

No

PayPal

No

No

To activate your preferred payment provider, please contact Upodi helpdesk.

 

We currently do not support tokenization via AltaPay. Stay tuned. We will update shortly. Contact us via intercom to get the private guide.

To use Upodi with ePay tokens, you must create a subscription via the ePay gateway provider, by following the various integration options.

As ePay token, we use subscription token in this example of ID 49820479.

Read how to create subscription in ePay here.

Upodi Payment

To create a payment method for Stripe token, make a POST request to /paymentmethods/:customerid/ with a body using the createpaymentmethod request object:

{
  "type" : 64 /* PureTokenBased = 64 */,
  "makedefault" : "true", /* will make the payment method default */
  "puretoken" : { 
    "token" : " 49820479", /* ePay subscription ID */
    "paymentgateway" : "epay"
  }
}
Suggest Edits

PayLike.IO

 

In order to setup PayLike.IO with Upodi you have to:

  1. Retrieve an APPKEY from the PayLike.IO account you want to use.
  1. Run a test payment on the same PayLike.IO account. We suggest you use the test card number 4100 0000 0000 and a valid expiration date.
  2. Click the successful test payment to retrieve the merchant ID from here.
  1. Navigate to Upodi and select Setup > Payment Providers > PayLike.IO. Provide the MerchantID and APPKEY from above to setup the payment provider.

Now the Payment Provider has been set up and you can start using Upodi with Paylike.io card tokens using the PayLike.IO SDK or API.

Read how to create a card token using PayLike.IO. See code sample here.

var paylike = Paylike('{your public key}', { style: false });
var $form = document.querySelector('form#checkout');
$form.addEventListener('submit', function( e ){
	e.preventDefault();

	paylike.tokenize($form, { }, 
		function( err, r ){
			if (err) {
				console.log(err);
		} else {
			var tokenizedCard = r.card.id;
			// example: 5ad5beb225735a2a38d6170e
			// call upodi API with tokenizedCard...            
		}
	});      
});

Upodi Payment

To create a payment method for PayLike.IO token, make a POST request to /paymentmethods/:customerid/ with a body using the createpaymentmethod request object:

{
  "type" : 64 /* PureTokenBased = 64 */,
  "makedefault" : "true", /* will make the payment method default */
  "puretoken" : { 
    "token" : "5ad5beb225735a2a38d6170e", /* Paylike.IO card token */
    "paymentgateway" : "paylike"
  }
}

To use Stripe tokens in Upodi, you must follow the implementation guidance from Stripe to create a customer with a default payment method (credit card) attached. You can use various methods from Stripe to integrate your token method with Upodi. Please see Stripe documentation here or our GitHub sample here.

Upodi then uses the customer id by Stripe. Example using the customer ID cus_C9VhJ6qk0qkKqI. In most cases, you should create tokens client-side using Checkout, Elements, or Stripe mobile libraries, instead of using the Stripe API.

Using Stripe to get a customer token

Stripe requires that you save the card token to a customer in order to use it for a recurring charge in the future.

Once you retrieve the card token (example: tok_60OX9jRXUI6WzLI0V2SFxUjr), do not charge the token. Instead save it to a customer object:

# Create a Customer:
curl https://api.stripe.com/v1/customers \
   -u sk_test_BQokikJOvBiI2HlWgH4olfQ2: \
   -d email="paying.user@example.com" \
   -d source=tok_60OX9jRXUI6WzLI0V2SFxUjr
// Set your secret key: remember to change this to your live secret key in production
// See your keys here: https://dashboard.stripe.com/account/apikeys
\Stripe\Stripe::setApiKey("sk_test_BQokikJOvBiI2HlWgH4olfQ2");

// Token is created using Checkout or Elements!
// Get the payment token ID submitted by the form:
$token = $_POST['stripeToken'];

// Create a Customer:
$customer = \Stripe\Customer::create(array(
  "email" => "paying.user@example.com",
  "source" => $token,
));
// Set your secret key: remember to change this to your live secret key in production
// See your keys here: https://dashboard.stripe.com/account/apikeys
StripeConfiguration.SetApiKey("sk_test_BQokikJOvBiI2HlWgH4olfQ2");

// Token is created using Checkout or Elements!
// Get the payment token submitted by the form:
var token = model.Token; // Using ASP.NET MVC

var customers = new StripeCustomerService();
var charges = new StripeChargeService();

var customer = customers.Create(new StripeCustomerCreateOptions {
  Email = "paying.user@example.com",
  SourceToken = token
});

Once you have created the customer, you can retrieve the customer id and send this to Upodi using our API. Further documentation is available on Stripes website.

You can see a sample page how to bulid a form for Upodi using Stripe elements here.

Provide the token to Upodi Payment

To create a payment method for Stripe token, make a POST request to /paymentmethods/:customerid/ with a body using the createpaymentmethod request object:

{
  "type" : 64 /* PureTokenBased = 64 */,
  "makedefault" : "true", /* will make the payment method default on the customer */
  "puretoken" : { 
    "token" : "cus_C9VhJ6qk0qkKqI", /* Stripe customer ID */
    "paymentgateway" : "stripe" 
  }
}
 

To use Upodi with QuickPay tokens, you must create a subscription in the QuickPay gateway provider, by following the various integration options.

As QuickPay token, we use subscription token in this example of ID 101239321.

Read how to create a subscription in QuickPay here.

QuickPay only support one currency per token

It is important that you match currency in Upodi with a subscription currency in QuickPay, if currency is setup incorrectly QuickPay subscription will be charged in currency that is set in Upodi.

Upodi Payment

To create a payment method for QuickPay token, make a POST request to /paymentmethods/:customerid/ with a body using the createpaymentmethod request object:

{
  "type" : 64 /* PureTokenBased = 64 */,
  "makedefault" : "true", /* will make the payment method default */
  "puretoken" : { 
    "token" : " 101239321", /* QuickPay subscription ID */
    "paymentgateway" : "quickpay"
  }
}
Suggest Edits

customer object

Properties of the customer object.

 
id guid
required
id of object, set by Upodi
parentid guid object id if the customer has a parent customer
billtoparent boolean if true, the parent customer will be the billing entity
collectivebilling boolean if true, billing is conducted as collective billing. read more here
accountnumber string Can be provided, otherwise will revert to a random of syntax "CU-xxxx".
companyname string Company name.
companyvat string VAT number of the customer. Syntax XX01234567, example DK39483902.
fullname string
required
Full name of the customer.
refkey string Custom key, example a remote id.
primaryemail string Primary email of customer.
currencycode string Default currency code of customer. Must be enabled in Settings. Syntax XXX, example USD.
autobill boolean When true, billing will be handled automatically.
paymentmethod guid Id of default payment method. If null, the customer is set to manual.
homephone string A provided phone number.
businessphone string A provided phone number.
mobilephone string A provided phone number.
addressline1 string Address line 1.
addressline2 guid Address line 1.
city guid Name of the account city.
postalcode string Postal- or zip code.
country string Country of account.
county string County of account.
state string Address state, for example WA.
note string Text field for custom notes.
defaultpaymentmethod paymentmethod Default payment method object if expanded.
paymentterm int Supported days of payment term. values:
  • -1 = notset
  • 0 = on reciept
  • 8 = net 8 days
  • 14 = net 14 days
  • 21 = net 21 days
  • 30 = net 30 days
  • 45 = net 45 days
  • 60 = net 60 days
  • 90 = net 90 days
createddate datetime Date of when the object was created.
modifieddate datetime Date of when the object was last modified.
createdby guid Id of the creator.
modifiedby guid Id of the modified.
subscriptions subscription array Read-only array of subscriptions. May be included otherwise use query options.
invoices invoice array Read-only array of invoices. May be included otherwise use query options.
paymentmethods paymentmethod array Read-only array of payment methods. May be included otherwise use query options.
subscriptioncharges subscriptioncharge array Read-only array of charges. May be included otherwise use query options.
transactions transaction array Read-only array of transactions. May be included otherwise use query options.
{
  /* id of object, set by Upodi */
  "id": "guid",
  /* object id if the customer has a parent customer */
  "parentid" : "guid",
  /* if true, the parent customer will be the billing entity */
  "billtoparent" : "boolean",
  /* required, can be customized */
  "accountnumber": "string",
  "companyname": "string",
  "companyvat": "string",
  /* required */
  "fullname": "string", 
  /* custom key, example a remote id */
  "refkey": "string", 
  "primaryemail": "string",
  /* required */
  "currencycode": "string", 
  /* required */
  "autobill": "boolean", 
  /* id of default payment method - can be extracted via $expand=DefaultPaymentMethod */
  "paymentmethod": "guid",
  "homephone": "string",
  "businessphone": "string",
  "mobilephone": "string",
  "addressline1": "string",
  "addressline2": "string",
  /* text field */
  "note": "string",
  /* address city */
  "city": "string",
  "postalcode": "string",
  /* address country */
  "country": "string",
  /* address county */
  "county": "string",
  /* address state */
  "state": "string",
  /* default payment method object if expanded */
  "defaultpaymentmethod": "paymentmethod object",
  "currency": "currency",
  /* supported days of payment term. values: 
  	-1=notset, 0=onreciept, 8=net8 days, 14=net14, 21=net21, 30=net30, 45=net45, 60=net60, 90=net90 */
  "paymentterm" : "int",
  /* array of subscription */
  "subscriptions": "subscription[]",
  /* array of invoices */
  "invoices": "invoice[] array",
  "paymentmethods": "paymentmethod[] array",
  "subscriptioncharges": "subscriptioncharge[] array",
  "transactions": "transaction[] array",  
  "createdby": "guid",
  "modifiedby": "guid",
  "createdbyuser": "userprofile object",
  "modifiedbyuser": "userprofile object",
  "createddate": "datetime",
  "modifieddate": "datetime"
}
Suggest Edits

contact object

Properties of the contact object. Contacts are always childs of existing customers.

 
{
  /* id of object, set by Upodi */
  "id": "guid",
  /* required. id of the parent customer */
  "customerid": "guid",
  /* required. defines the type of contact. 8=invoice is sent to contact, 16= Delivery 	adress is used from contact, 32= EAN contact. Uses combined value of flags (fx 24=invoice is sent to contant and delivery to) */
  "contacttype": "int",
  /* required */
  "fullname": "string", 
  /* custom key, example a remote id */
  "refkey": "string", 
  "primaryemail": "string",
  "homephone": "string",
  "businessphone": "string",
  "mobilephone": "string",
  "addressline1": "string",
  "addressline2": "string",
  /* text field */
  "note": "string",
  /* address city */
  "city": "string",
  "postalcode": "string",
  /* address country */
  "country": "string",
  /* address county */
  "county": "string",
  /* address state */
  "state": "string",
  "createdby": "guid",
  "modifiedby": "guid",
  "createdbyuser": "userprofile object",
  "modifiedbyuser": "userprofile object",
  "createddate": "datetime",
  "modifieddate": "datetime"
}
Suggest Edits

createpaymentmethod object

Used for the /paymentmethods/:customerid/ POST request.

 

See /paymentmethods/:customerid/ request. The given payment method need to be configured with a matching payment gateway before the payment method is accepted and processed.

{
  "type" : int /* PureTokenBased = 64, FI = 128, LS = 256, Upodi card token = 8 */,
  "makedefault" : "boolean", /* will make the payment method default on the customer */
  "puretoken" : { /* Optional. Only define properties if type=64 (token) is defined. */
    "token" : "string",
    "paymentgateway" : "string" /* Optional. Only define properties if type=64 (token) is defined. Example stripe, epay, quickpay etc. */
  },
  "fi" : { /* Optional. Only define properties if type=128 (FI) is defined. */
    "ficustomernumber" : "string"
  },
  "creditcard" : { /* Optional. Only define properties if type=8 (Upodi.js token) is defined. */
    "cardtoken" : "string"
  },
  "ls" : { /* Optional. Leverandør Service. Only define properties if type=256 (FI) is defined. */
    "bankregnumber" : "integer", /* 4 numbers long, example 9890 */
    "bankaccountnumber" : "integer", /* 10 numbers long */
    "cvrnumber" : "integer" /*8 numbers long */
  }
}

Example
The following outlines an example where the POST /paymentmethods/:customerid/ will create a default payment method on a customer, as a Stripe token.

{
  "type" : 64,
  "makedefault" : "true",
  "puretoken" : { 
  	"token" : "card_2445249082",
  	"paymentgateway" : "stripe"
  }
}
Suggest Edits

discount object

Properties of the discount object.

 
{
  /* id of object, set by Upodi */
  "id": "guid",
  "fullname" : "string",
 	 /* procentage = 0 */
  "discounttypeenum" : "integer",
 	 /* procentage amount */
  "amount" : "decimal",
  "InvoiceText" : "string",
  	/* 100=days,200=weeks,300=months,400=years. Defines expiry period */
  "expiryperiod": "integer",
  	/* number of days, weeks, months, years */
  "expiryperiodinterval": "integer",
  "createdby": "guid",
  "modifiedby": "guid",
  "createdbyuser": "userprofile object",
  "modifiedbyuser": "userprofile object",
  "createddate": "datetime",
  "modifieddate": "datetime"
}
Suggest Edits

discountcode object

Properties of the discountcode object.

 

Full discount code for application is formatted as {codeprefix}-{code}. You can apply this to a customer, a subscription or a subscription charge.

{
  /* id of object, set by Upodi */
  "id": "guid",
  /* required */
  "codeprefix" : "string",
  /* required. a code */
  "code" : "string",
  /* active=0, expired=1, consumed=2 */
  "state" : "integer",
  /* allows null, or the end date of the valid use. */
  "expiredate": "guid",
  /* readonly. number of times the code is consumed */
  "usecount" : "integer",
  "discountid" : "guid",
  /* 0 for endless, a positive number for the times a code can be used */
  "redemption" : "int",
  "discount" : "discount object"
}
Suggest Edits

discountconsumer object

Properties of the discountconsumer object.

 
{
  /* id of object, set by Upodi */
  "id": "guid",
  /* id of discount object */
  "discountid" : "guid",
  /* id of consuming object - customer, subscripion or subscriptioncharge */
  "consumerid" : "guid",
  "discount" : "discount object",
  /* customer=0, subscription=1, subscriptioncharge=2 */
  "consumertype" : "int",
  "expirydate": "datetime",
  "modifiedby": "guid",
  "createdbyuser": "userprofile object",
  "modifiedbyuser": "userprofile object",
  "createddate": "datetime",
  "modifieddate": "datetime"
}
Suggest Edits

subscription object

Properties of the subscription object

 
{
  /* id of object, set by upodi */
  "id": "guid",
  "customerid": "guid",
  /* Required. */
  "productplanid": "guid",
  /* Required. number of the subscription, can be custom */
  "subscriptionnumber": "string",
  /* allow null, if set switches to plan on renewal */ 
  "switchtoplanid" : "guid",
  /* if true, the subscription auto renews */
  "autorenew": "boolean",
  /* set by upodi. 0=active, 1=renewing, 2=grace, 3=expired, 4=cancelled, 5=draft, 6=pendingending, 7=ended, 8=hold */
  "statecode": "integer",
  /* set by upodi. 1024=deleted, 7=inactive, 1=active, 0=draft */
  "status": "integer", 
  "startdate": "datetime",
  "enddate": "datetime",
  /* read-only. tell the life time of the subscription */
  "lifetime": "integer", 
  /* internal of the term set by the initialtermperiod, example 1 for "one month" */
  "initialterminterval": "integer",
  /* days=100, months=300, quarters=400, years=500 */
  "initialtermperiod": "integer",
  /* read-only. initial period in string. */
  "initialterm": "string",
	/* internal of the term set by the renewaltermperiod, example 6 for "6 months" */
  "renewalterminterval": "integer",
  /* days=100, months=300, quarters=400, years=500 */
  "renewaltermperiod": "integer",
  /* read-only. renewal period in string. */
  "renewalterm": "string",
  /* custom key, example a remote id */
  "refkey": "string",
  /* set by upodi */
  "lastrenewaldate": "datetime",
  /* set by upodi */
  "cancellationdate": "datetime",
  /* set by upodi */
  "activationdate": "datetime",
  "customer": "customer object",
  "productplan": "productplan object",
  "subscriptioncharges": "subscriptioncharge[] array",
  /* set by upodi */
  "createdby": "guid",
  /* set by upodi */
  "modifiedby": "guid",
  /* set by upodi */
  "createdbyuser": "userprofile object",
  /* set by upodi */
  "modifiedbyuser": "userprofile object",
  /* set by upodi */
  "createddate": "datetime",
  /* set by upodi */
  "modifieddate": "datetime"
}
Suggest Edits

subscriptioncharge object

Properties of the subscription charge object

 

A subscription charge will be created for each billing cycle. The state of the previous subscription charge object will be transferred to the a new "pending" subscription charge. This enables a history of each charge back in time. New IDs are set for each new charge.

{
  /* id of object, set by upodi */
  "id": "guid",
  "amount": "float",
  "nextchargedate": "datetime",
  "previouschargedate": "datetime",
  "subscription": "subscription",
  "productplancharge": "productplancharge",
  "customer": "customer",
  "subscriptionid": "guid",
  /* set by upodi */
  "toggled" : "boolean",
  "productplanchargeid" : "guid",
  "customerid" : "guid",
  "unitprice" : "float",
  "currencycode" : "string",
  "description" : "string",
  "invoiceid" : "guid",
  "invoice" : "invoice",
  "statecode" : "integer",
  "createdby" : "guid",
  "modifiedby" : "guid",
  /* draft=0,active=1,hold=2 */
  "statecode" : "integer",
  /* draft=0,active=1,inactive=7,deleted=1024 */
  "status" : "integer",
  /* set by upodi */
  "createdbyuser": "userprofile",
  /* set by upodi */
  "modifiedbyuser": "userprofile",
  /* set by upodi */
  "createddate": "datetime",
  "modifieddate": "datetime"
}
Suggest Edits

invoice object

Properties of the invoice object

 
{
  "id": "guid",
  "customerid": "guid",
  "subscriptionid": "guid",
  "currencycode": "string",
  "totalamount": "float",
  "total": "float",
  "totalvat": "float",
  "invoicedate": "datetime",
  "duedate": "datetime",
  "paymentdate": "datetime",
    /* 
    1024=failed,80=declined,70=pendingresponse,60=pendingprocessing,
    50=cancelled,40=overdue,30=overpaid, 20=paid, 10=booked, 0=draft 
    */
  "paymentstatus": "integer",
  /* text representation of the payment method */
  "paymentdescriptor" : "string",
  /* text representation of the invoice (example INV-0002130) */
  "invoicenumber": "string",
  /* numeric of the invoice number (example 2130) */
  "invoicenumeric" : "integer",
  "subscription": "subscription",
  "customer": "customer",
  "invoicelines": "invoicelines[]",
  "dunningschemeid": "guid",
  "dunningscheme": "dunningscheme",
  "dunningstep": "integer",
  /* set by Upodi - external ERP id */
  "externalfinance" : "string",
  /* normal=0, draft=1, booked=2, failedbook=1024 */
  "externalstatecode" : "integer",
  /* used for integration, cam be set to a custom value */
  "refkey" : "string",
  "nextretry": "datetime",
  "createdby": "guid",
  "modifiedby": "guid",
  "createdbyuser": "userprofile",
  "modifiedbyuser": "userprofile",
  "createddate": "datetime",
  "modifieddate": "datetime"
}
Suggest Edits

invoiceline object

Properties of the invoiceline object

 
{
  "id": "guid",
  "description": "string",
  /* required */
  "invoiceid": "guid",
  "subscriptionchargeid": "guid",
  "productplanchargeid": "guid",
  "linenumber": "integer",
  "quantity": "float",
  "totalvat": "float",
  "unitprice": "float",
  "totalprice": "float",
  "invoice": "invoice",
  /* set by upodi */
  "periodstart" : "date",
  /* set by upodi */
  "periodend" : "date",
  "discount" : "float",
  "discountamount" : "float",
  "subscriptioncharge": "subscriptioncharge",
  "productplancharge": "productplancharge",
  "uomid": "guid",
  "unit": "string",
  "totalpriceexchangerate" : "float",
  "totalpricebasecurrency" : "float",
  "createddate": "datetime",
  "modifieddate": "datetime"
}
Suggest Edits

paymentmethod object

Properties of a paymentmethod object.

 
{
  "customer": "object",
  "id" : "guid",
  "fullname" : "string",
  "issuer" : "string",
  "customerid" : "string",
  "expirydate" : "datetime",
  /* PureTokenBased=64, Creditcard=8, ManualInvoice=0, FI=128 */
  "paymentmethodtype" : int,
  "createddate" : "datetime",
  "modifieddate" : "datetime",
  "paymentdata" : "string"
}
Suggest Edits

productplan object

Properties of the productplan object

 
{
  "id": "guid",
  "productfamilyid": "guid",
  "sku": "string",
  "fullname": "string",
  "currencycode": "string",
    /* "DKK, EUR" */
  "activecurrencies": "string",
  "currencies": "string[]",
  "description": "string",
    /* 1024=deleted, 7=inactive, 1=active, 0=draft */
  "status": "integer",
    /* 0=none, 1=prorate upgrades */
  "changehandle": "integer",
  "productplancharges": "productplancharge[]",
  "subscriptions": "subscription[]",
  "productfamily": "productfamily",
  "productplanpricings": "productplanpricing[]",
  "createdby": "guid",
  "modifiedby": "guid",
  "createdbyuser": "userprofile",
  "modifiedbyuser": "userprofile",
  "createddate": "datetime",
  "modifieddate": "datetime"
}
Suggest Edits

productplancharge object

Properties of the productplancharge object

 
{
    /* contains aligned productplancharge objects */
  "addonproductcharge": "productplancharge",
  "id": "guid",
  "productplanid": "guid",
  "fullname": "string",
  "invoicetext": "string",
    /* 8=flatfee,16=perunit,tieredpricing=32,volumepricing=64,procentage=1024,custom=12 */
  "pricingmodel": "integer",
    /* 8=onetime,16=recurring,32=usage */
  "chargetype": "integer",
    /* 100=daily,200=weekly,300=monthly,
       400=quarterly,500=annually,1000=dayofweek,
       1100=dayofmonth,1200=lastdayofmonth */
  "billingperiod": "integer",
  "billingperiodinterval": "integer",
    /* 8=subscriptionstartdate,16=subscriptionenddate,
       32=subscriptioncancellationdate,64=subscriptionactivationdate,
       128=subscriptioncreationdate */
  "billingperiodalignment": "integer",
  "billingday": "integer",
  "defaultamount": "float",
  	/* a string used to identify products for balancing purposes usually in erp-systems */
  "sku": "string",
  	/* a string used to connect products for switch plan */
  "anchorcode": "string",
  "taxable": "boolean",
    /* 0=charge, 10=dependency; - dependency to a parent productplancharge */
  "productchargetype": "integer",
  "productplan": "productplan",
  "productplanchargepricings": "productplanchargepricing[]",
  "subscriptioncharges": "subscriptioncharge[]",
  "uom": "uom",
  "uomid": "guid",
  "createdby": "guid",
  "modifiedby": "guid",
  "createdbyuser": "userprofile",
  "modifiedbyuser": "userprofile",
  "createddate": "datetime",
  "modifieddate": "datetime"
}
Suggest Edits

productfamily object

Properties of the productfamily object

 
{
  "id": "string",
  "fullname": "string",
  "productplans": "productplan[]",
  "dunningschemeid": "guid",
  "dunningscheme": "dunningscheme",
  "createdby": "guid",
  "modifiedby": "guid",
  "createdbyuser": "userprofile",
  "modifiedbyuser": "userprofile",
  "createddate": "datetime",
  "modifieddate": "datetime"
}
Suggest Edits

productplanchargepricing object

Properties of the productplanchargepricing object

 
{
  "id": "guid",
  "productplanchargeid": "guid",
  "productplanid": "guid",
  "segment": "integer",
  "currencycode": "string",
  "price": "float",
  "tierfrom": "integer",
  "tierto": "integer",
  /* perunit=1,flatfee=0 */
  "tierpriceformat": "integer",
  "productplancharge": "productplancharge",
  "productplan": "productplan",
  "createddate": "datetime",
  "modifieddate": "datetime"
}
Suggest Edits

transaction object

Properties of the transaction object

 
{
  "id": "guid",
  "customerid": "guid",
  "invoiceid": "guid",
  /* unknown=0, decline=8,failure=16, success=1 */
  "statecode": "integer",
  /* inactive=7, active=1, draft=0, deleted=1024 */
  "status": "integer",
  /* void=2, verification=4, payment=8, refund=16, decline=32, chargeback=64 */
  "type": "integer",
  "totalamount": "float",
  "currencycode": "string",
  "paymentmethodid": "guid",
  "paymentproviderid": "guid",
  "customer": "customer",
  "paymentmethod": "paymentmethod",
  "paymentprovider": "paymentprovider",
  "invoice": "invoice",
  /* none=0,generic=101010, cardexpired=30000, invalidcardnumber=40100, invalidcardexpiry=40200, invalidcardcvc=40300, carddecline=101011, carddeclinefraud=101020, cardholder=101021 */
  "errorcode": "integer",
  "gatewayreference": "string",
  "gatewayresponse": "string",
  "gatewayerrorcode": "string",
  "createdby": "guid",
  "modifiedby": "guid",
  "createdbyuser": "userprofile",
  "modifiedbyuser": "userprofile",
  "createddate": "datetime",
  "modifieddate": "datetime"
}
Suggest Edits

currency object

Properties of the currency object

 
{
  "id": "integer",
  "currencyname": "string",
  "exchangerate": "float",
  "currencyid": "string",
  "isactive": "boolean"
}
Suggest Edits

uom object

Properties of the uom object

 
{
  "id": "string",
  "fullname": "string",
  "pluralname": "string",
  "status": "integer",
  "createddate": "datetime",
  "modifieddate": "datetime",
}
 
Suggest Edits

/customers/

Returns an array of customers.

API Token scope
  • READ.
 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.upodi.io/v2/customers
curl --request GET \
  --url https://api.upodi.io/v2/customers
var request = require("request");

var options = { method: 'GET', url: 'https://api.upodi.io/v2/customers' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/customers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.upodi.io/v2/customers");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/customers"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Response

OK

See the customer object below.

Suggest Edits

/customers/

Creates a customer and return the id.

API Token scope
  • WRITE.
 

Header Auth

 Authentication is required for this endpoint.
posthttps://api.upodi.io/v2/customers
curl --request POST \
  --url https://api.upodi.io/v2/customers
var request = require("request");

var options = { method: 'POST', url: 'https://api.upodi.io/v2/customers' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/customers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.upodi.io/v2/customers");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/customers"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Body Params

accountnumber
string

Account number of customer.

companyname
string

Company name field.

companyvat
string

VAT field in syntax DK01234567

fullname
string
required

Full name field.

refkey
string

Reference key for integration.

primaryemail
email

E-mail of customer.

currencycode
string

Syntax DKK, EUR. Must be enabled.

autobill
boolean

Boolean.

paymentmethod
string

Guid or UUID. Allows null.

parentid
string

Guid or UUID. Allows null.

billtoparent
integer

boolean

homephone
string
businessphone
string
mobilephone
string
addressline1
string
addressline2
string
city
string
postalcode
string
country
string

Address country.

county
string

Address county.

state
string

Address state.

note
string

Note field for various information.

defaultpaymentmethod
object

PaymentMethod object.

 
paymentterm
integer

payment terms

subscriptions
array of objects

Read-only.

customerid
productplanid
switchtoplanid
subscriptionnumber
autorenew
statecode
status
startdate
enddate
lifetime
initialterminterval
initialtermperiod
initialterm
renewalterminterval
renewaltermperiod
renewalterm
refkey
lastrenewaldate
cancellationdate
activationdate
customer 
productplan 
subscriptioncharges
activities
createdby
modifiedby
createdbyuser 
modifiedbyuser 
id
createddate
modifieddate
invoices
array of objects

Read-only.

customerid
subscriptionid
currencycode
invoicecounter
invoicenumeric
total
totalvat
invoicedate
duedate
paymentdescriptor
paymentdate
paymentstatus
invoicenumber
subscription 
customer 
invoicelines
dunningschemeid
dunningscheme 
dunningstep
externalfinance
externalstatecode
refkey
nextretry
createdby
modifiedby
createdbyuser 
modifiedbyuser 
id
createddate
modifieddate
paymentmethods
array of objects

Read-only.

id
fullname
issuer
customerid
expirydate
paymentmethodtype
createddate
modifieddate
customer 
paymentdata
subscriptioncharges
array of objects

Read-only.

amount
nextchargedate
previouschargedate
subscription 
productplancharge 
customer 
subscriptionid
productplanchargeid
customerid
unitprice
currencycode
description
toggled
ismanual
iscredit
invoiceid
invoice 
statecode
createdby
modifiedby
createdbyuser 
modifiedbyuser 
id
createddate
modifieddate
transactions
array of objects

Read-only.

customerid
invoiceid
statecode
status
type
environment
totalamount
currencycode
paymentmethodid
paymentproviderid
customer 
paymentmethod 
paymentprovider 
invoice 
errorcode
gatewayreference
gatewayresponse
gatewayerrorcode
createdby
modifiedby
createdbyuser 
modifiedbyuser 
id
createddate
modifieddate
activities
array of objects

Read-only.

entity 
id
entityid
activitytype
status
description
duedate
recipient
owner
createdby
createddate
modifieddate
createdby
string

Guid or UUID.

modifiedby
string

Guid or UUID.

createdbyuser
object
 
modifiedbyuser
object
 
id
string

Guid or UUID.

createddate
string

Read-only. Set by Upodi. Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z.

modifieddate
string

Read-only. Set by Upodi. Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z.

Response

Created. Body contains the id of the newly created object.

idstring

guid

Bad request. Invalid fields of object.

Duplicate. Check accountnumber.

General service error.

Suggest Edits

/customers/

Update an existing customer.

API Token scope

  • WRITE.
 

Header Auth

 Authentication is required for this endpoint.
puthttps://api.upodi.io/v2/customers
curl --request PUT \
  --url https://api.upodi.io/v2/customers
var request = require("request");

var options = { method: 'PUT', url: 'https://api.upodi.io/v2/customers' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/customers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.upodi.io/v2/customers");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/customers"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Body Params

accountnumber
string

Account number of customer.

companyname
string

Company name field.

companyvat
string

VAT field in syntax DK01234567

fullname
string
required

Full name field.

refkey
string

Reference key for integration.

primaryemail
email

E-mail of customer.

currencycode
string

Syntax DKK, EUR. Must be enabled.

autobill
boolean

Boolean.

paymentmethod
string

Guid or UUID. Allows null.

parentid
string

Guid or UUID. Allows null.

billtoparent
integer

boolean

homephone
string
businessphone
string
mobilephone
string
addressline1
string
addressline2
string
city
string
postalcode
string
country
string

Address country.

county
string

Address county.

state
string

Address state.

note
string

Note field for various information.

defaultpaymentmethod
object

PaymentMethod object.

 
paymentterm
integer

payment terms

subscriptions
array of objects

Read-only.

customerid
productplanid
switchtoplanid
subscriptionnumber
autorenew
statecode
status
startdate
enddate
lifetime
initialterminterval
initialtermperiod
initialterm
renewalterminterval
renewaltermperiod
renewalterm
refkey
lastrenewaldate
cancellationdate
activationdate
customer 
productplan 
subscriptioncharges
activities
createdby
modifiedby
createdbyuser 
modifiedbyuser 
id
createddate
modifieddate
invoices
array of objects

Read-only.

customerid
subscriptionid
currencycode
invoicecounter
invoicenumeric
total
totalvat
invoicedate
duedate
paymentdescriptor
paymentdate
paymentstatus
invoicenumber
subscription 
customer 
invoicelines
dunningschemeid
dunningscheme 
dunningstep
externalfinance
externalstatecode
refkey
nextretry
createdby
modifiedby
createdbyuser 
modifiedbyuser 
id
createddate
modifieddate
paymentmethods
array of objects

Read-only.

id
fullname
issuer
customerid
expirydate
paymentmethodtype
createddate
modifieddate
customer 
paymentdata
subscriptioncharges
array of objects

Read-only.

amount
nextchargedate
previouschargedate
subscription 
productplancharge 
customer 
subscriptionid
productplanchargeid
customerid
unitprice
currencycode
description
toggled
ismanual
iscredit
invoiceid
invoice 
statecode
createdby
modifiedby
createdbyuser 
modifiedbyuser 
id
createddate
modifieddate
transactions
array of objects

Read-only.

customerid
invoiceid
statecode
status
type
environment
totalamount
currencycode
paymentmethodid
paymentproviderid
customer 
paymentmethod 
paymentprovider 
invoice 
errorcode
gatewayreference
gatewayresponse
gatewayerrorcode
createdby
modifiedby
createdbyuser 
modifiedbyuser 
id
createddate
modifieddate
activities
array of objects

Read-only.

entity 
id
entityid
activitytype
status
description
duedate
recipient
owner
createdby
createddate
modifieddate
createdby
string

Guid or UUID.

modifiedby
string

Guid or UUID.

createdbyuser
object
 
modifiedbyuser
object
 
id
string

Guid or UUID.

createddate
string

Read-only. Set by Upodi. Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z.

modifieddate
string

Read-only. Set by Upodi. Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z.

Response

No content. Customer updated.

Bad request. Invalid fields of object.

General service error.

Suggest Edits

/customers/:id

Return a single customer. Requires API scope 'read'.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.upodi.io/v2/customers/id
curl --request GET \
  --url https://api.upodi.io/v2/customers/id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.upodi.io/v2/customers/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/customers/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.upodi.io/v2/customers/id");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/customers/id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of customer. Guid or UUID.

Response

OK

accountnumberstring

Account number of customer.

companynamestring

Company name field.

companyvatstring

VAT field in syntax DK01234567

fullnamestring

Full name field.

refkeystring

Reference key for integration.

primaryemailstring

E-mail of customer.

currencycodestring

Syntax DKK, EUR. Must be enabled.

autobillboolean

Boolean.

paymentmethodstring

Guid or UUID. Allows null.

parentidstring

Guid or UUID. Allows null.

billtoparentinteger

boolean

homephonestring
businessphonestring
mobilephonestring
addressline1string
addressline2string
citystring
postalcodestring
countrystring

Address country.

countystring

Address county.

statestring

Address state.

notestring

Note field for various information.

defaultpaymentmethodobject

PaymentMethod object.

paymentterminteger

payment terms

subscriptionsarray

Read-only.

invoicesarray

Read-only.

paymentmethodsarray

Read-only.

subscriptionchargesarray

Read-only.

transactionsarray

Read-only.

activitiesarray

Read-only.

createdbystring

Guid or UUID.

modifiedbystring

Guid or UUID.

createdbyuserobject
modifiedbyuserobject
idstring

Guid or UUID.

createddatestring

Read-only. Set by Upodi. Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z.

modifieddatestring

Read-only. Set by Upodi. Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z.

Malformed request.

Not found. No object of id.

General service error.

Suggest Edits

/customers/:id

Delete a single customer. Requires API scope 'write'.

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://api.upodi.io/v2/customers/id
curl --request DELETE \
  --url https://api.upodi.io/v2/customers/id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.upodi.io/v2/customers/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/customers/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.upodi.io/v2/customers/id");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/customers/id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of customer

Response

No content.

Suggest Edits

/customers/:id/invoices

Return a list of invoice ids as a string array. Requires API scope 'read'.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.upodi.io/v2/customers/id/invoices
curl --request GET \
  --url https://api.upodi.io/v2/customers/id/invoices
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.upodi.io/v2/customers/id/invoices' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/customers/id/invoices")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.upodi.io/v2/customers/id/invoices");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/customers/id/invoices"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of customer. Guid or UUID.

Response

OK

Not found. No object of id.

General service error.

Suggest Edits

customers/{accountNumber}/accountnumber

Get a customer based on the account number

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.upodi.io/v2/customers/accountnumber/accountnumber/
curl --request GET \
  --url https://api.upodi.io/v2/customers/accountnumber/accountnumber/
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.upodi.io/v2/customers/accountnumber/accountnumber/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/customers/accountnumber/accountnumber/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.upodi.io/v2/customers/accountnumber/accountnumber/");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/customers/accountnumber/accountnumber/"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

accountnumber
string
required

Account number of customer

Response

Customer object.

Not found.

Suggest Edits

customers/{accountNumber}/refkey

Get a customer based on the reference key

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.upodi.io/v2/customers/refkey/refkey/
curl --request GET \
  --url https://api.upodi.io/v2/customers/refkey/refkey/
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.upodi.io/v2/customers/refkey/refkey/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/customers/refkey/refkey/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.upodi.io/v2/customers/refkey/refkey/");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/customers/refkey/refkey/"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

refkey
string
required

Reference key

Response

Customer object.

Not found.

Suggest Edits

paymentmethod

 
Suggest Edits

/customers/:id/paymentmethods

Return a list of payment method ids. Requires API scope 'read'.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.upodi.io/v2/customers/id/paymentmethods/
curl --request GET \
  --url https://api.upodi.io/v2/customers/id/paymentmethods/
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.upodi.io/v2/customers/id/paymentmethods/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/customers/id/paymentmethods/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.upodi.io/v2/customers/id/paymentmethods/");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/customers/id/paymentmethods/"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of customer

Response

OK

idstring

Guid or UUID.

fullnamestring
issuerstring
customeridstring

Guid or UUID.

expirydatestring

Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z. Allows null.

paymentmethodtypeinteger
createddatestring

Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z.

modifieddatestring

Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z.

customerobject
paymentdatastring

Not found. No object of id.

General service error.

Suggest Edits

customers/:paymentMethodId/validatepaymentmethod/

Validates an associated payment method of a customer.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.upodi.io/v2/customers/paymentMethodId/validatepaymentmethod/
curl --request GET \
  --url https://api.upodi.io/v2/customers/paymentMethodId/validatepaymentmethod/
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.upodi.io/v2/customers/paymentMethodId/validatepaymentmethod/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/customers/paymentMethodId/validatepaymentmethod/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.upodi.io/v2/customers/paymentMethodId/validatepaymentmethod/");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/customers/paymentMethodId/validatepaymentmethod/"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

paymentMethodId
string
required

Guid.

Response

True or false in body.

Not found.

Suggest Edits

/customers/:id/assigncardtoken

Assigns a card to a customer and maps it as a payment method. Requires API scope 'write'.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://api.upodi.io/v2/customers/id/assigncardtoken/
curl --request PUT \
  --url https://api.upodi.io/v2/customers/id/assigncardtoken/
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.upodi.io/v2/customers/id/assigncardtoken/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/customers/id/assigncardtoken/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.upodi.io/v2/customers/id/assigncardtoken/");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/customers/id/assigncardtoken/"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of customer. Guid or UUID.

Body Params

token
string
required
makedefault
integer

boolean

Response

No content.

Body is a string of the card token recieved from upodi.js.

{
  "token" : "card_322jkl24j4lk2j", /* required */
  "makedefault" : "true" /* optional parameter */
}
Suggest Edits

/customers/:id/setdefaultpaymentmethod

Assigns a default payment method. Requires API scope 'write'.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://api.upodi.io/v2/customers/id/setdefaultpaymentmethod/
curl --request PUT \
  --url https://api.upodi.io/v2/customers/id/setdefaultpaymentmethod/
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.upodi.io/v2/customers/id/setdefaultpaymentmethod/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/customers/id/setdefaultpaymentmethod/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.upodi.io/v2/customers/id/setdefaultpaymentmethod/");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/customers/id/setdefaultpaymentmethod/"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of customer

Response

No content.

Body is a string of the payment method id, i.e. "0e13a91b-90dc-4d5e-a24d-ed7c359672a5".

"0e13a91b-90dc-4d5e-a24d-ed7c359672a5"
Suggest Edits

/paymentmethods/

Returns a list of payment method. Requires API scope 'read'.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.upodi.io/v2/paymentmethods/
curl --request GET \
  --url https://api.upodi.io/v2/paymentmethods/
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.upodi.io/v2/paymentmethods/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/paymentmethods/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.upodi.io/v2/paymentmethods/");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/paymentmethods/"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Response

OK

idstring

Guid or UUID.

fullnamestring
issuerstring
customeridstring

Guid or UUID.

expirydatestring

Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z. Allows null.

paymentmethodtypeinteger
createddatestring

Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z.

modifieddatestring

Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z.

customerobject
paymentdatastring
Suggest Edits

/paymentmethods/:id

Returns a payment method by id. Requires API scope 'read'.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.upodi.io/v2/paymentmethods/id/
curl --request GET \
  --url https://api.upodi.io/v2/paymentmethods/id/
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.upodi.io/v2/paymentmethods/id/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/paymentmethods/id/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.upodi.io/v2/paymentmethods/id/");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/paymentmethods/id/"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of payment method. Guid or UUID.

Response

OK

idstring

Guid or UUID.

fullnamestring
issuerstring
customeridstring

Guid or UUID.

expirydatestring

Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z. Allows null.

paymentmethodtypeinteger
createddatestring

Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z.

modifieddatestring

Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z.

customerobject
paymentdatastring
Suggest Edits

/paymentmethods/:customerid/bycustomer

Returns a paymenthod by customer id. Requires API scope 'read'.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.upodi.io/v2/paymentmethods/customerid/bycustomer/
curl --request GET \
  --url https://api.upodi.io/v2/paymentmethods/customerid/bycustomer/
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.upodi.io/v2/paymentmethods/customerid/bycustomer/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/paymentmethods/customerid/bycustomer/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.upodi.io/v2/paymentmethods/customerid/bycustomer/");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/paymentmethods/customerid/bycustomer/"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

customerid
string
required

ID of customer. Guid or UUID.

Response

OK

idstring

Guid or UUID.

fullnamestring
issuerstring
customeridstring

Guid or UUID.

expirydatestring

Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z. Allows null.

paymentmethodtypeinteger
createddatestring

Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z.

modifieddatestring

Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z.

customerobject
paymentdatastring
Suggest Edits

/paymentmethods/:customerid/

Created a new payment method on a customer. Requires API scope 'write'.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://api.upodi.io/v2/paymentmethods/customerid
curl --request POST \
  --url https://api.upodi.io/v2/paymentmethods/customerid
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.upodi.io/v2/paymentmethods/customerid' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/paymentmethods/customerid")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.upodi.io/v2/paymentmethods/customerid");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/paymentmethods/customerid"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

customerid
string
required

ID of customer. Guid or UUID.

Body Params

type
integer

Describes the type of the payment method to create. 8= creditcard, 64=pure token (external), 128=fi

makedefault
boolean

If set true the payment method will be set as default on the customer.

puretoken
object

Optional. For use of 3rd party token gateways.

 
puretoken.token
string

Required. Token in plain text.

puretoken.paymentgateway
string

Required. Name of the payment gateway to use, example 'quickpay', 'epay', 'stripe' etc.

ls
object

Optional. LS object with properties. See LsObject.

 
ls.bankregnumber
string

Required. bank registration number (example 9890).

ls.bankaccountnumber
string

Required. Account number.

ls.cvrnumber
string

Required. CVR number.

fi
object

Optional. FI object with property FiCustomerNumber as string.

 
fi.ficustomernumber
string

Optional. FI customer number.

creditcard
object

Optional. Upodi token from upodi.js here.

 
creditcard.cardtoken
string

Optional. Upodi token from upodi.js here.

Response

Created. Body contains the id of the newly created object.

Bad request. Invalid fields of object.

General service error.

 
Suggest Edits

/contacts/

Returns an array of contacts. Requires API scope 'read'.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.upodi.io/v2/contacts
curl --request GET \
  --url https://api.upodi.io/v2/contacts
var request = require("request");

var options = { method: 'GET', url: 'https://api.upodi.io/v2/contacts' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/contacts")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.upodi.io/v2/contacts");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/contacts"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Response

OK

Suggest Edits

/contacts/

Creates a contact and returns the id. Requires API scope WRITE.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://api.upodi.io/v2/contacts
curl --request POST \
  --url https://api.upodi.io/v2/contacts
var request = require("request");

var options = { method: 'POST', url: 'https://api.upodi.io/v2/contacts' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/contacts")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.upodi.io/v2/contacts");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/contacts"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Body Params

customerid
string
required

Guid or UUID.

contacttype
integer
required

Defines the type of contact. 8=Invoice is sent to contact, 16= Delivery adress is used from contact, 32= EAN contact. Uses combined value of flags (fx 24=Invoice is sent to contant and delivery to)

fullname
string
required

Full name field.

refkey
string

Reference key for integration.

primaryemail
email

E-mail of contact.

homephone
string
businessphone
string
mobilephone
string
addressline1
string
addressline2
string
city
string
postalcode
string
country
string

Address country.

county
string

Address county.

state
string

Address state.

note
string

Note field for various information.

createdby
string

Guid or UUID.

modifiedby
string

Guid or UUID.

createdbyuser
object
 
modifiedbyuser
object
 
id
string

Guid or UUID.

createddate
string

Read-only. Set by Upodi. Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z.

modifieddate
string

Read-only. Set by Upodi. Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z.

Response

Created. Body contains the id of the newly created object.

idstring

guid

Bad request. Invalid fields of object.

General service error.

Suggest Edits

/contacts/

Update existing contact. Requires API scope WRITE.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://api.upodi.io/v2/contacts
curl --request PUT \
  --url https://api.upodi.io/v2/contacts
var request = require("request");

var options = { method: 'PUT', url: 'https://api.upodi.io/v2/contacts' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/contacts")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.upodi.io/v2/contacts");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/contacts"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Body Params

customerid
string
required

Guid or UUID.

contacttype
integer
required

Defines the type of contact. 8=Invoice is sent to contact, 16= Delivery adress is used from contact, 32= EAN contact. Uses combined value of flags (fx 24=Invoice is sent to contant and delivery to)

fullname
string
required

Full name field.

refkey
string

Reference key for integration.

primaryemail
email

E-mail of contact.

homephone
string
businessphone
string
mobilephone
string
addressline1
string
addressline2
string
city
string
postalcode
string
country
string

Address country.

county
string

Address county.

state
string

Address state.

note
string

Note field for various information.

createdby
string

Guid or UUID.

modifiedby
string

Guid or UUID.

createdbyuser
object
 
modifiedbyuser
object
 
id
string

Guid or UUID.

createddate
string

Read-only. Set by Upodi. Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z.

modifieddate
string

Read-only. Set by Upodi. Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z.

Response

No content. Contact updated.

Bad request. Invalid fields of object.

General service error.

Suggest Edits

/contacts/:id

Return a single contact. Requires API scope 'read'.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.upodi.io/v2/contacts/id
curl --request GET \
  --url https://api.upodi.io/v2/contacts/id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.upodi.io/v2/contacts/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/contacts/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.upodi.io/v2/contacts/id");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/contacts/id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of contact. Guid or UUID.

Response

OK

customeridstring

Guid or UUID.

contacttypeinteger

Defines the type of contact. 8=Invoice is sent to contact, 16= Delivery adress is used from contact, 32= EAN contact. Uses combined value of flags (fx 24=Invoice is sent to contant and delivery to)

fullnamestring

Full name field.

refkeystring

Reference key for integration.

primaryemailstring

E-mail of contact.

homephonestring
businessphonestring
mobilephonestring
addressline1string
addressline2string
citystring
postalcodestring
countrystring

Address country.

countystring

Address county.

statestring

Address state.

notestring

Note field for various information.

createdbystring

Guid or UUID.

modifiedbystring

Guid or UUID.

createdbyuserobject
modifiedbyuserobject
idstring

Guid or UUID.

createddatestring

Read-only. Set by Upodi. Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z.

modifieddatestring

Read-only. Set by Upodi. Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z.

Malformed request.

Not found. No object of id.

General service error.

Suggest Edits

/contacts/:id

Delete a single contact. Requires API scope 'write'.

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://api.upodi.io/v2/contacts/id
curl --request DELETE \
  --url https://api.upodi.io/v2/contacts/id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.upodi.io/v2/contacts/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/contacts/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.upodi.io/v2/contacts/id");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/contacts/id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of contact

Response

No content.

Suggest Edits

/contacts/:id/customer

Retrieve a list of contacts for a customer.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.upodi.io/v2/contacts/id/customer
curl --request GET \
  --url https://api.upodi.io/v2/contacts/id/customer
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.upodi.io/v2/contacts/id/customer' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/contacts/id/customer")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.upodi.io/v2/contacts/id/customer");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/contacts/id/customer"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of customer

Response

OK

Suggest Edits

/contacts/:refkey/refkey

Retrieves a list of contacts on given refkey.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.upodi.io/v2/contacts/refkey/refkey
curl --request GET \
  --url https://api.upodi.io/v2/contacts/refkey/refkey
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.upodi.io/v2/contacts/refkey/refkey' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/contacts/refkey/refkey")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.upodi.io/v2/contacts/refkey/refkey");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/contacts/refkey/refkey"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

refkey
string
required

Reference key

Response

OK

 
Suggest Edits

/discounts/

Returns a list of discounts. Requires API scope 'read'.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.upodi.io/v2/discounts
curl --request GET \
  --url https://api.upodi.io/v2/discounts
var request = require("request");

var options = { method: 'GET', url: 'https://api.upodi.io/v2/discounts' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/discounts")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.upodi.io/v2/discounts");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/discounts"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Response

OK

Suggest Edits

/discounts/

Updates a discount. Requires API scope 'write'.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://api.upodi.io/v2/discounts
curl --request PUT \
  --url https://api.upodi.io/v2/discounts
var request = require("request");

var options = { method: 'PUT', url: 'https://api.upodi.io/v2/discounts' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/discounts")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.upodi.io/v2/discounts");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/discounts"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Body Params

id
string

Guid or UUID. Required for update. Not valid for create.

fullname
string

Name of discount

type
integer

Type of discount. The type has to be 0

amount
number

Decimal of procentage, example 0.43 = 43%.

invoicetext
string

Text for invoice text.

Response

Updated.

Not found.

Suggest Edits

/discounts/

Creates a discount. Requires API scope 'write'. The type has to be 0, as for now we don’t have other discount type but 0 is meant as default percentage type discount.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://api.upodi.io/v2/discounts
curl --request POST \
  --url https://api.upodi.io/v2/discounts
var request = require("request");

var options = { method: 'POST', url: 'https://api.upodi.io/v2/discounts' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/discounts")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.upodi.io/v2/discounts");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/discounts"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Body Params

id
string

Guid or UUID. Required for update. Not valid for create.

fullname
string

Name of discount

type
integer

Type of discount. The type has to be 0

amount
number

Decimal of procentage, example 0.43 = 43%.

invoicetext
string

Text for invoice text.

Response

Created. Body contains the id of the newly created object.

idstring

guid

Suggest Edits

/discounts/:id

Returns a single discount. Requires API scope 'read'.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.upodi.io/v2/discounts/id
curl --request GET \
  --url https://api.upodi.io/v2/discounts/id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.upodi.io/v2/discounts/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/discounts/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.upodi.io/v2/discounts/id");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/discounts/id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of discount. Guid or UUID.

Response

Discount object.

fullnamestring
createdbystring

Read-only. Set by Upodi. Guid or UUID.

modifiedbystring

Read-only. Set by Upodi. Guid or UUID.

createdbyuserobject

Read-only. Set by Upodi. Guid or UUID.

modifiedbyuserobject

Read-only. Set by Upodi. Guid or UUID.

idstring

Guid or UUID.

createddatestring

Read-only. Set by Upodi. Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z.

modifieddatestring

Read-only. Set by Upodi. Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z.

Not found.

Suggest Edits

/discounts/:id

Deletes discount using its id.

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://api.upodi.io/v2/discounts/id
curl --request DELETE \
  --url https://api.upodi.io/v2/discounts/id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.upodi.io/v2/discounts/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/discounts/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.upodi.io/v2/discounts/id");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/discounts/id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of discount. Guid or UUID.

Response

Discount deleted.

Discount deleted.

Not found.

Suggest Edits

/discounts/:id/applydiscountcodecustomer

Applies a discount to a customer. Requires API scope 'write'.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://api.upodi.io/v2/discounts/id/applydiscountcodecustomer
curl --request PUT \
  --url https://api.upodi.io/v2/discounts/id/applydiscountcodecustomer
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.upodi.io/v2/discounts/id/applydiscountcodecustomer' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/discounts/id/applydiscountcodecustomer")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.upodi.io/v2/discounts/id/applydiscountcodecustomer");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/discounts/id/applydiscountcodecustomer"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of customer.

Response

Discount appled.

Not found.

Body must be a string of a valid discount-code, i.e. "discount-24mjui42j". Syntax is "{prefix}-{code}".

"discount-24mjui42j"
curl -X PUT \
	https://api.upodi.io/v2/discounts/{customer id}/applydiscountcodecustomer
  -h "Authorization: Bearer XXXXXX"
  -d "\"discount-24mjui42j\""
Suggest Edits

/discounts/:id/applydiscountcodesubscription

Applies a discount to a subscription. Requires API scope 'write'.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://api.upodi.io/v2/discounts/id/applydiscountcodesubscription
curl --request PUT \
  --url https://api.upodi.io/v2/discounts/id/applydiscountcodesubscription
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.upodi.io/v2/discounts/id/applydiscountcodesubscription' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/discounts/id/applydiscountcodesubscription")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.upodi.io/v2/discounts/id/applydiscountcodesubscription");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/discounts/id/applydiscountcodesubscription"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of subscription. Guid or UUID.

Response

Discount appled.

Not found.

Body must be a string of a valid discount-code, i.e. "discount-24mjui42j". Syntax is "{prefix}-{code}".

"discount-24mjui42j"
curl -X PUT \
	https://api.upodi.io/v2/discounts/{subscription id}/applydiscountcodesubscription
  -h "Authorization: Bearer XXXXXX"
  -d "\"discount-24mjui42j\""
Suggest Edits

/discounts/:id/applydiscountcodesubscriptioncharge

Applies a discount to a subscription charge. Requires API scope 'write'.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://api.upodi.io/v2/discounts/id/applydiscountcodesubscriptioncharge
curl --request PUT \
  --url https://api.upodi.io/v2/discounts/id/applydiscountcodesubscriptioncharge
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.upodi.io/v2/discounts/id/applydiscountcodesubscriptioncharge' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/discounts/id/applydiscountcodesubscriptioncharge")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.upodi.io/v2/discounts/id/applydiscountcodesubscriptioncharge");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/discounts/id/applydiscountcodesubscriptioncharge"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of subscription charge.

Response

Discount appled.

Not found.

Body must be a string of a valid discount-code, i.e. "discount-24mjui42j". Syntax is "{prefix}-{code}".

"discount-24mjui42j"
curl -X PUT \
	https://api.upodi.io/v2/discounts/{subscription charge id}/applydiscountcodesubscriptioncharge
  -h "Authorization: Bearer XXXXXX"
  -d "\"discount-24mjui42j\""
Suggest Edits

/discounts/:id/cleardiscountcodecustomer

Clear a discount from a customer. Requires API scope 'write'.

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://api.upodi.io/v2/discounts/id/cleardiscountcodecustomer
curl --request DELETE \
  --url https://api.upodi.io/v2/discounts/id/cleardiscountcodecustomer
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.upodi.io/v2/discounts/id/cleardiscountcodecustomer' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/discounts/id/cleardiscountcodecustomer")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.upodi.io/v2/discounts/id/cleardiscountcodecustomer");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/discounts/id/cleardiscountcodecustomer"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of customer. Guid or UUID.

Response

Discount removed.

Not found.

Suggest Edits

/discounts/:id/cleardiscountcodesubscription

Clear a discount from a subscription. Requires API scope 'write'.

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://api.upodi.io/v2/discounts/id/cleardiscountcodesubscription
curl --request DELETE \
  --url https://api.upodi.io/v2/discounts/id/cleardiscountcodesubscription
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.upodi.io/v2/discounts/id/cleardiscountcodesubscription' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/discounts/id/cleardiscountcodesubscription")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.upodi.io/v2/discounts/id/cleardiscountcodesubscription");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/discounts/id/cleardiscountcodesubscription"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of subscription.

Response

Discount removed.

Not found.

Suggest Edits

/discounts/:id/generatediscountcodes

Generates a list of discount codes.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://api.upodi.io/v2/discounts/id/generatediscountcodes
curl --request PUT \
  --url https://api.upodi.io/v2/discounts/id/generatediscountcodes
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.upodi.io/v2/discounts/id/generatediscountcodes' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/discounts/id/generatediscountcodes")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.upodi.io/v2/discounts/id/generatediscountcodes");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/discounts/id/generatediscountcodes"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
integer
required

Id of discount to create codes under.

Body Params

prefix
string

Prefix of the discount code.

amount
number

Number of codes to create. Must be larger than 0.

redemption
integer
expirydate
string

Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z. Allows null.

Response

OK

Suggest Edits

/discounts/:id/discountcodes/

Retrieves a list of discount codes of a discount.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.upodi.io/v2/discounts/id/discountcodes
curl --request GET \
  --url https://api.upodi.io/v2/discounts/id/discountcodes
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.upodi.io/v2/discounts/id/discountcodes' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/discounts/id/discountcodes")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.upodi.io/v2/discounts/id/discountcodes");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/discounts/id/discountcodes"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of discount.

Response

OK

Suggest Edits

/discounts/discountcode/

Deletes a discount code if not in use or already consumed.

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://api.upodi.io/v2/discounts/discountcode
curl --request DELETE \
  --url https://api.upodi.io/v2/discounts/discountcode
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.upodi.io/v2/discounts/discountcode' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/discounts/discountcode")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.upodi.io/v2/discounts/discountcode");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/discounts/discountcode"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Response

Discount code removed.

Discount code removed.

Discount code is in use and cannot be removed or body is empty.

Discount code not found.

BODY must be a string with " provided, no json formatting.

"discount-24M24klm2kl"
Suggest Edits

subscription

 
Suggest Edits

/subscriptions/

Returns a list of subscriptions. Requires API scope 'read'.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.upodi.io/v2/subscriptions
curl --request GET \
  --url https://api.upodi.io/v2/subscriptions
var request = require("request");

var options = { method: 'GET', url: 'https://api.upodi.io/v2/subscriptions' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/subscriptions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.upodi.io/v2/subscriptions");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/subscriptions"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Response

OK

Suggest Edits

/subscriptions/

Creates a new subscription. Subscriptions need to be activated before being active. Requires API scope 'write'.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://api.upodi.io/v2/subscriptions
curl --request POST \
  --url https://api.upodi.io/v2/subscriptions
var request = require("request");

var options = { method: 'POST', url: 'https://api.upodi.io/v2/subscriptions' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/subscriptions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.upodi.io/v2/subscriptions");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/subscriptions"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Body Params

customerid
string

Guid or UUID.

productplanid
string

Guid or UUID.

switchtoplanid
string

Guid or UUID.

subscriptionnumber
string
autorenew
integer

Boolean.

statecode
integer

0=active, 1=renewing, 2=grace, 3=expired, 4=cancelled, 5=draft, 6=pendingending, 7=ended, 8=hold

status
integer

1024=deleted, 7=inactive, 1=active, 0=draft.

startdate
string

Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z.

enddate
string

Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z. Allows null.

lifetime
integer
initialterminterval
integer
initialtermperiod
integer
initialterm
string
renewalterminterval
integer
renewaltermperiod
integer
renewalterm
string
refkey
string
lastrenewaldate
string

Read-only, set by Upodi. Not subject to POST. Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z. Allows null.

cancellationdate
string

Read-only, set by Upodi. Not subject to POST. Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z. Allows null.

activationdate
string

Read-only, set by Upodi. Not subject to POST. Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z. Allows null.

customer
object
 
productplan
object
 
subscriptioncharges
array of objects

Read-only. Not subject to POST. During POST, the subscription will inherit charges from the product plan.

amount
nextchargedate
previouschargedate
subscription 
productplancharge 
customer 
subscriptionid
productplanchargeid
customerid
unitprice
currencycode
description
toggled
ismanual
iscredit
invoiceid
invoice 
statecode
createdby
modifiedby
createdbyuser 
modifiedbyuser 
id
createddate
modifieddate
activities
array of objects

Read-only. List of activities applied.

entity 
id
entityid
activitytype
status
description
duedate
recipient
owner
createdby
createddate
modifieddate
createdby
string

Guid or UUID.

modifiedby
string

Guid or UUID.

createdbyuser
object
 
modifiedbyuser
object
 
id
string

Guid or UUID.

createddate
string

Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z.

modifieddate
string

Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z.

Response

Created. Body contains the id of the newly created object.

idstring

guid

Bad request. Invalid fields of object.

General service error.

Suggest Edits

/subscriptions/:id

Get a subscription based on the id. Requires API scope 'read'.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.upodi.io/v2/subscriptions/id
curl --request GET \
  --url https://api.upodi.io/v2/subscriptions/id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.upodi.io/v2/subscriptions/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/subscriptions/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.upodi.io/v2/subscriptions/id");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/subscriptions/id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of subscription. Guid or UUID.

Response

OK

customeridstring

Guid or UUID.

productplanidstring

Guid or UUID.

switchtoplanidstring

Guid or UUID.

subscriptionnumberstring
autorenewinteger

Boolean.

statecodeinteger

0=active, 1=renewing, 2=grace, 3=expired, 4=cancelled, 5=draft, 6=pendingending, 7=ended, 8=hold

statusinteger

1024=deleted, 7=inactive, 1=active, 0=draft.

startdatestring

Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z.

enddatestring

Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z. Allows null.

lifetimeinteger
initialtermintervalinteger
initialtermperiodinteger
initialtermstring
renewaltermintervalinteger
renewaltermperiodinteger
renewaltermstring
refkeystring
lastrenewaldatestring

Read-only, set by Upodi. Not subject to POST. Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z. Allows null.

cancellationdatestring

Read-only, set by Upodi. Not subject to POST. Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z. Allows null.

activationdatestring

Read-only, set by Upodi. Not subject to POST. Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z. Allows null.

customerobject
productplanobject
subscriptionchargesarray

Read-only. Not subject to POST. During POST, the subscription will inherit charges from the product plan.

activitiesarray

Read-only. List of activities applied.

createdbystring

Guid or UUID.

modifiedbystring

Guid or UUID.

createdbyuserobject
modifiedbyuserobject
idstring

Guid or UUID.

createddatestring

Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z.

modifieddatestring

Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z.

Suggest Edits

/subscriptions/:id/setamount/

Sets quantity on all subscription charges or the one with specific productplanchargeid.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://api.upodi.io/v2/subscriptions/id/setamount/
curl --request PUT \
  --url https://api.upodi.io/v2/subscriptions/id/setamount/
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.upodi.io/v2/subscriptions/id/setamount/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/subscriptions/id/setamount/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.upodi.io/v2/subscriptions/id/setamount/");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/subscriptions/id/setamount/"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of subscription. Guid or UUID.

Body Params

quantity
string

Decimal of the new amount.

productplanchargeid
string

Guid or UUID. Specific id of productplancharge.

all
string

If specified true, will ignore productplanchargeid, and set quantity across all charges. If set to false it will only update quantity of subscriptioncharges with given productplanchargeid.

prorate
boolean

If specified true, will continue to allow proration if proration is allowed on the product plan. If set to false it will update the quantity but overrule a potential proration calculation.

Response

No content.

Bad request.

Not found.

General service error.

Suggest Edits

/subscriptions/:id/activate

Activate a newly created subscription.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://api.upodi.io/v2/subscriptions/id/activate/
curl --request PUT \
  --url https://api.upodi.io/v2/subscriptions/id/activate/
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.upodi.io/v2/subscriptions/id/activate/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/subscriptions/id/activate/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.upodi.io/v2/subscriptions/id/activate/");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/subscriptions/id/activate/"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of subscription. Guid or UUID.

Response

No content.

Bad request.

Not found.

General service error.

Suggest Edits

/subscriptions/:id/switchplan

Switch a subscription plan from one to another.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://api.upodi.io/v2/subscriptions/id/switchplan/
curl --request PUT \
  --url https://api.upodi.io/v2/subscriptions/id/switchplan/
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.upodi.io/v2/subscriptions/id/switchplan/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/subscriptions/id/switchplan/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.upodi.io/v2/subscriptions/id/switchplan/");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/subscriptions/id/switchplan/"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of subscription. Guid or UUID.

Query Params

prorate
string

If false a proration is prohibited.

Response

No content, but succesful switched.

Bad request.

Not found.

General service error.

Body must contain the id of the new product plan. Be sure to include the " to keep json formatting.

"0a8eff02-a470-4a77-b37b-cbba97840e50"
"0a8eff02-a470-4a77-b37b-cbba97840e50"
PUT https://api.upodi.io/v2/subscriptions/33bae0dd-f348-46e4-b865-2aeada684128/switchplan/?prorate=true HTTP/1.1
Content-type: application/json
Content-length: 5
Authorization: Bearer ...

"0a8eff02-a470-4a77-b37b-cbba97840e50"
curl -X PUT 
	-d '"0a8eff02-a470-4a77-b37b-cbba97840e50", "prorate": "true"' 
  -H 'Content-type: application/json' 
  -H 'Authorization: Bearer...' 
  https://api.upodi.io/v2/subscriptions/33bae0dd-f348-46e4-b865-2aeada684128/switchplan/?prorate=true
Suggest Edits

/subscriptions/:id/cancel

Cancels an active subscription.

API Token scope

  • WRITE.
 

Header Auth

 Authentication is required for this endpoint.
puthttps://api.upodi.io/v2/subscriptions/id/cancel/
curl --request PUT \
  --url https://api.upodi.io/v2/subscriptions/id/cancel/
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.upodi.io/v2/subscriptions/id/cancel/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/subscriptions/id/cancel/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.upodi.io/v2/subscriptions/id/cancel/");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/subscriptions/id/cancel/"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of subscription. Guid or UUID.

Response

No content. subscription updated.

Bad request.

Not found.

General service error.

Suggest Edits

/subscriptions/:id/resume

Resume a hold subscription.

API Token scope

  • WRITE.
 

Header Auth

 Authentication is required for this endpoint.
puthttps://api.upodi.io/v2/subscriptions/id/resume/
curl --request PUT \
  --url https://api.upodi.io/v2/subscriptions/id/resume/
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.upodi.io/v2/subscriptions/id/resume/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/subscriptions/id/resume/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.upodi.io/v2/subscriptions/id/resume/");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/subscriptions/id/resume/"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of subscription. Guid or UUID.

Response

No content. subscription resumed.

Bad request.

Not found.

General service error.

Suggest Edits

/subscriptions/:id/hold

Holds an active subscription.

API Token scope

  • WRITE.
 

Header Auth

 Authentication is required for this endpoint.
puthttps://api.upodi.io/v2/subscriptions/id/hold/
curl --request PUT \
  --url https://api.upodi.io/v2/subscriptions/id/hold/
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.upodi.io/v2/subscriptions/id/hold/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/subscriptions/id/hold/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.upodi.io/v2/subscriptions/id/hold/");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/subscriptions/id/hold/"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of subscription. Guid or UUID.

Response

No content. subscription updated.

Bad request.

Not found.

General service error.

Suggest Edits

/subscriptions/:id/expire

Expire an active subscription.

API Token scope

  • WRITE.
 

Header Auth

 Authentication is required for this endpoint.
puthttps://api.upodi.io/v2/subscriptions/id/expire/
curl --request PUT \
  --url https://api.upodi.io/v2/subscriptions/id/expire/
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.upodi.io/v2/subscriptions/id/expire/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/subscriptions/id/expire/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.upodi.io/v2/subscriptions/id/expire/");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/subscriptions/id/expire/"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of subscription. Guid or UUID.

Response

No content. subscription updated.

Bad request.

Not found.

General service error.

Suggest Edits

/subscriptions/:id/setpaymentmethod

Make a subscription use a specific paymentmethod.

API Token scope

  • WRITE.
 

Header Auth

 Authentication is required for this endpoint.
puthttps://api.upodi.io/v2/subscriptions/id/setpaymentmethod/
curl --request PUT \
  --url https://api.upodi.io/v2/subscriptions/id/setpaymentmethod/
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.upodi.io/v2/subscriptions/id/setpaymentmethod/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/subscriptions/id/setpaymentmethod/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.upodi.io/v2/subscriptions/id/setpaymentmethod/");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/subscriptions/id/setpaymentmethod/"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of subscription. Guid or UUID.

Response

No content. subscription updated.

Bad request.

Not found.

General service error.

Body must contain the Id of the Payment Method. The payment method has to exist on the Subscription Customer.

"8d5e55bf-a1d1-48cf-bf47-82e8330551b9"
Suggest Edits

/subscriptions/:id/removepaymentmethod

Remove any specific paymentmethod on subscription.

API Token scope

  • WRITE.
 

Header Auth

 Authentication is required for this endpoint.
puthttps://api.upodi.io/v2/subscriptions/id/removepaymentmethod/
curl --request PUT \
  --url https://api.upodi.io/v2/subscriptions/id/removepaymentmethod/
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.upodi.io/v2/subscriptions/id/removepaymentmethod/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/subscriptions/id/removepaymentmethod/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.upodi.io/v2/subscriptions/id/removepaymentmethod/");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/subscriptions/id/removepaymentmethod/"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of subscription. Guid or UUID.

Response

No content. subscription updated.

Bad request.

Not found.

General service error.

Suggest Edits

subscriptioncharge

 
Suggest Edits

/subscriptioncharges/

Returns a list of subscription charges. Requires API scope 'read'.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.upodi.io/v2/subscriptionCharges
curl --request GET \
  --url https://api.upodi.io/v2/subscriptionCharges
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.upodi.io/v2/subscriptionCharges' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/subscriptionCharges")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.upodi.io/v2/subscriptionCharges");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/subscriptionCharges"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Response

OK

Suggest Edits

/subscriptioncharges/:id

Get a subscriptioncharge based on the id. Requires API scope 'read'.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.upodi.io/v2/subscriptionCharges/id
curl --request GET \
  --url https://api.upodi.io/v2/subscriptionCharges/id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.upodi.io/v2/subscriptionCharges/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/subscriptionCharges/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.upodi.io/v2/subscriptionCharges/id");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/subscriptionCharges/id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of subscription charge. Guid or UUID.

Response

OK

amountnumber
nextchargedatestring

Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z. Allows null.

previouschargedatestring

Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z. Allows null.

subscriptionobject
productplanchargeobject
customerobject
subscriptionidstring

Guid or UUID. Allows null.

productplanchargeidstring

Guid or UUID. Allows null.

customeridstring

Guid or UUID.

unitpricenumber
currencycodestring
descriptionstring
toggledinteger

boolean. Set by Upodi.

ismanualinteger

Boolean.

iscreditinteger

Boolean.

invoiceidstring

Guid or UUID. Allows null.

invoiceobject
statecodeinteger

draft=0,active=1,inactive=7,deleted=1024.

createdbystring

Guid or UUID.

modifiedbystring

Guid or UUID.

createdbyuserobject
modifiedbyuserobject
idstring

Guid or UUID.

createddatestring

Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z.

modifieddatestring

Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z.

Suggest Edits

/subscriptioncharges/:id

Update the most current subscription charge of id.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://api.upodi.io/v2/subscriptionCharges/id
curl --request PUT \
  --url https://api.upodi.io/v2/subscriptionCharges/id
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.upodi.io/v2/subscriptionCharges/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/subscriptionCharges/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.upodi.io/v2/subscriptionCharges/id");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/subscriptionCharges/id"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of subscription charge. Guid or UUID.

Body Params

nextchargedate
string

Optional. Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z. Allows null. If provided, next charge date will be set.

quantity
number

Optional. New amount of charge. Allows null. If provided, the amount will be overwritten.

description
string

Optional. Description of the charge.

customprice
number

Optional. Decimal of custom pricing. If provided, custom pricing is applied. Set customprice to 0 to reset.

Response

OK

amountnumber
nextchargedatestring

Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z. Allows null.

previouschargedatestring

Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z. Allows null.

subscriptionobject
productplanchargeobject
customerobject
subscriptionidstring

Guid or UUID. Allows null.

productplanchargeidstring

Guid or UUID. Allows null.

customeridstring

Guid or UUID.

unitpricenumber
currencycodestring
descriptionstring
toggledinteger

boolean. Set by Upodi.

ismanualinteger

Boolean.

iscreditinteger

Boolean.

invoiceidstring

Guid or UUID. Allows null.

invoiceobject
statecodeinteger

draft=0,active=1,inactive=7,deleted=1024.

createdbystring

Guid or UUID.

modifiedbystring

Guid or UUID.

createdbyuserobject
modifiedbyuserobject
idstring

Guid or UUID.

createddatestring

Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z.

modifieddatestring

Date and time in RFC 3339 format. YYYY-MM-DDT23:59:60Z.

Suggest Edits

/subscriptioncharges/:id/setamount/

Set the amount of a subscription charge. Requires API scope 'write'.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://api.upodi.io/v2/subscriptionCharges/id/setamount/
curl --request PUT \
  --url https://api.upodi.io/v2/subscriptionCharges/id/setamount/
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.upodi.io/v2/subscriptionCharges/id/setamount/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/subscriptionCharges/id/setamount/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.upodi.io/v2/subscriptionCharges/id/setamount/");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/subscriptionCharges/id/setamount/"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of subscription charge. Guid or UUID.

Query Params

prorate
string

If false a proration is prohibited.

Response

OK

Body must be a decimal of the new amount. Please format numbers by US numeric standard. Be sure to include the " to keep json formatting.

"3.2"
"3.2", "prorate": "true"
PUT https://api.upodi.io/v2/subscriptionCharges/33bae0dd-f348-46e4-b865-2aeada684128/setamount/ HTTP/1.1
Content-type: application/json
Content-length: 5
Authorization: Bearer ...

"3.2", "prorate": "true"
curl -X PUT 
	-d '"3.2", "prorate": "true"' 
  -H 'Content-type: application/json' 
  -H 'Authorization: Bearer...' 
  https://api.upodi.io/v2/subscriptionCharges/33bae0dd-f348-46e4-b865-2aeada684128/setamount/
Suggest Edits

/subscriptioncharges/:id/togglecharge/

Toggles the subscriptioncharge on/off. Requires API scope 'write'.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://api.upodi.io/v2/subscriptionCharges/id/togglecharge/
curl --request PUT \
  --url https://api.upodi.io/v2/subscriptionCharges/id/togglecharge/
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.upodi.io/v2/subscriptionCharges/id/togglecharge/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/subscriptionCharges/id/togglecharge/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.upodi.io/v2/subscriptionCharges/id/togglecharge/");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/subscriptionCharges/id/togglecharge/"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of subscription charge. Guid or UUID.

Response

OK

Suggest Edits

/subscriptioncharges/:id/hold/

Hold a given subscription charge.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://api.upodi.io/v2/subscriptionCharges/id/hold/
curl --request PUT \
  --url https://api.upodi.io/v2/subscriptionCharges/id/hold/
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.upodi.io/v2/subscriptionCharges/id/hold/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/subscriptionCharges/id/hold/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.upodi.io/v2/subscriptionCharges/id/hold/");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/subscriptionCharges/id/hold/"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of subscription charge. Guid or UUID.

Response

OK

Charge can't be toggled, charge is not type of alignment charge.

Suggest Edits

/time/

Returns the current time of the server. Requires API scope 'read'.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.upodi.io/v2/time
curl --request GET \
  --url https://api.upodi.io/v2/time
var request = require("request");

var options = { method: 'GET', url: 'https://api.upodi.io/v2/time' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/time")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.upodi.io/v2/time");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/time"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Response

OK

 
Suggest Edits

/invoices/

Returns a list of invoices. Requires API scope 'read'.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.upodi.io/v2/invoices
curl --request GET \
  --url https://api.upodi.io/v2/invoices
var request = require("request");

var options = { method: 'GET', url: 'https://api.upodi.io/v2/invoices' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/invoices")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.upodi.io/v2/invoices");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/invoices"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Response

OK

Suggest Edits

/invoices/:id

Get a invoice based on the id. Requires API scope 'read'.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.upodi.io/v2/invoices/id
curl --request GET \
  --url https://api.upodi.io/v2/invoices/id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.upodi.io/v2/invoices/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.upodi.io/v2/invoices/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.upodi.io/v2/invoices/id");

xhr.send(data);
import requests

url = "https://api.upodi.io/v2/invoices/id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated