Apruve

The Apruve Developer Hub

Welcome to the Apruve developer hub. You'll find comprehensive guides and documentation to help you start working with Apruve as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Getting Started

 

Overview

Getting Started

Apruve is an automated way to handle payments from your business customers, and to manage payments for your purchases. Every transaction on Apruve starts life as an Order that is submitted to Apruve through a checkout on your shopper's browser. From there, Apruve and the merchant interact over this API to finalize the details of the order.

Beta API and Documentation

This is a BETA copy of our documentation, and our v4 API is still considered BETA as well. This means that things might change without notice, and that the documentation might be wrong too. Please let us know how we can help get you unstuck, or if we can provide clarification, or if we need to update the documentation to make something clearer. Just open an email editor and send us a note at support@apruve.com.

Order Lifecycle

Apruve looks to your eCommerce system as a Payment Gateway. So your customer creates an Order in Apruve as a way to interact with a matching order in your system. Integrating with your eCommerce system is handled either by writing code to interact with apruve.js, or by installing one of our integration plugins.

At the end of Apruve's checkout process, apruve.js will send an Order UUID to your eCommerce system through Javascript. Once your system receives this ID, you may start interacting over this REST API to Apruve.

Depending on your specific business requirements, you may end up having different workflows to get an order approved. But in every case, your order needs to be finalized, and an invoice needs to be issued against that order.

Orders can have the following states:

  • new: The Order has been created, but not yet escalated for approval
  • pending: The Order is waiting for credit and/or account holder approval
  • accepted: The account has sufficient credit available and the account holder has approved the Order
  • canceled: The Order has been rejected by the account holder, the purchaser has insufficient credit, or has been canceled by the seller

Finalizing an Order

Finalizing an order signals to Apruve that the eCommerce system is not going to make any further changes to the order before it's presented to the customer. Finalizing an order only signals that the order is ready to be approved by the decision maker. Note that an order does not have to have an invoice on it to be approved, and an approved order does not represent real money movement from the buyer to the seller. It only indicates that the order has been accepted as presented.

Issuing an Invoice

Once the eCommerce system knows what should be charged for the order, it may issue an invoice. The amount of the invoice may differ from the Order, but providing as much data as possible about why an invoice may differ in cost is an important aspect of communicating with your customer.

Once an invoice is issued, it becomes Open and may be paid at any point after that. If the order was approved with a payment method, the invoice may be paid automatically.

Invoices can have the following states:

  • pending: The Invoice has been created, but has not yet been issued to the payer
  • open: The Invoice has been issued to the payer and is awaiting payment and/or funding
  • funded: You have been paid for this Invoice by the bank, but it is still awaiting payment by the purchaser
  • closed: The Invoice has been fully paid for by the purchaser
  • canceled: The Invoice has been withdrawn, and no goods will be provided or payments will be received

Webhooks and Fulfillment

Invoices and Orders produce Webhook notifications that can be captured by your eCommerce system to indicate to it when to fulfill an order. In most situations, the order going to Approved will be enough to trigger shipment of goods. But in some cases, a more sophisticated system may be required to lower loss risk, or to work within an industries unique constraints.

*_on_create Fields

Getting started with Apruve is easy. Apruve has a number of default flags that make getting started much easier. By default all these flags are true, and must be set to false to disable their behavior.

Order finalize_on_create

For an order to be presented to your customer, it must first be 'Finalized'. This signals to Apruve that the order is not going to have any more changes and that the customer can act upon it. By default Apruve will automatically finalize any order that is submitted, this indicates that the fields of the order are already set and will not change.

Order invoice_on_create

For you to receive money, an invoice must be created and issued to notify a customer that they owe money to a merchant. By default apruve will automatically create an invoice based on the Order information. The amount on the order will become the invoice amount, and the order's order_items will be copied to the invoice. The invoice will automatically be issued.

Invoice issue_on_create

If you need to create an invoice against an order, Apruve will assume that whatever invoice you create should be automatically issued. If you'd like to create an invoice to be opened later, you can set issue_on_create to false so that the invoice does not automatically issue. If you set the invoice this way, you must issue the Invoice manually using the Invoice action.

Use Cases

We want Apruve to be easy to use, even in the API. To borrow a page from Python, we want easy things to be easy and hard things to be possible. We think we've hit that balance with our *_on_create flags, the defaults are easy, but if you need to do something more complicated, they may be turned off.

1. Simple Uses

If you don't need to modify the order or the invoice before the customer is asked for payment, leave all the flags on. Apruve will automatically finalize the order and issue the first invoice and attempt to pay it. You may wish to fetch the order from Apruve after you receive the order_id, to store the order's status, or to inspect if you should fulfill. In this case the only integration points for your system will be this order, and a Webhook handler.

2. Shipping Costs Calculation

If you have to modify the order with shipping cost, tax or some other change, you may turn off finalize_on_create by setting your order's finalize_on_create to false. Once the shipping and tax has been calculated, update the order and finalize it. Since invoice_on_create is still set to true, an invoice will be created and issued when you call finalize.

3. Invoicing Separately

Perhaps your industry requires that you invoice after an order is fulfilled. If that's the case, you would set invoice_on_create to false on the order to ensure that it does not attempt to get paid prematurely. In this case the order would be approved, and at some later time, perhaps after a tracking number for shipment has been assigned, an invoice would be created against the order for payment.

4. Completely Manual

If you require total control over the Apruve process, be sure to set both finalize_on_create and invoice_on_create to false on the order as it's constructed. Once the invoice is created, and updated the way that it is required, you must Finalize the order by POSTing to the Order's Finalize action.

Either before or after you've finalized the order, you will need to create an invoice against the order. If you create the invoice before you finalize, it will remain pending until the order is finalized. If you create the invoice after the order has been finalized, the invoice will be issued automatically as soon as the order is approved.

Stuck?

Be sure and contact us if you have questions, suggestions, or just want to chat! We're always available at support@apruve.com.

Orders

 

Create an Order

Creates a new order with an attached quote for offline order entry. You must look up the customer ID first, and the customer will be given the option to approve or reject the quote.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://test.apruve.com/api/v4/orders
curl --request POST \
  --url https://test.apruve.com/api/v4/orders
var request = require("request");

var options = { method: 'POST', url: 'https://test.apruve.com/api/v4/orders' };

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

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

url = URI("https://test.apruve.com/api/v4/orders")

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://test.apruve.com/api/v4/orders");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/orders"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "730cd103b8e8377359851498e5c34f7b",
  "merchant_id": "6eaa1367004b78783dbd6ba1c60435f7",
  "customer_id": "2f95ada72c51e7e93f1d5c5266608e6e",
  "shopper_id": "0d276128688e1f99617f8b68aec50b3a",
  "amount_cents": 12345,
  "currency": "USD",
  "status": "pending",
  "merchant_order_id": "1234ABC-DEF",
  "accepts_payment_terms": true,
  "tax_cents": 123,
  "shipping_cents": 456,
  "expire_at": "2016-06-01T13:54:21.000Z",
  "created_at": "2016-06-01T13:54:21.000Z",
  "final_state_at": "2016-06-01T13:54:21.000Z",
  "order_items": [
    {
      "id": "033e74eb10ac3202ca12b9cf21383c3d",
      "order_id": "730cd103b8e8377359851498e5c34f7b",
      "price_ea_cents": 1234,
      "quantity": 1,
      "price_total_cents": 12345,
      "currency": "USD",
      "title": "Widgets",
      "merchant_notes": "foo",
      "description": "bar",
      "sku": "ABC123",
      "variant_info": "baz",
      "vendor": "MyCompany",
      "links": {
        "self": "https://test.apruve.com/api/v4/order_items/033e74eb10ac3202ca12b9cf21383c3d",
        "order": "https://test.apruve.com/api/v4/orders/033e74eb10ac3202ca12b9cf21383c3d"
      }
    }
  ],
  "payment_term": {
    "corporate_account_id": "0b7efd49aa54bf96174a57c43d881a7e",
    "type": "CorporateAccount",
    "status": "approved",
    "escalated_at": "2016-06-01T13:54:21.000Z",
    "final_state_at": "2016-06-01T13:54:21.000Z",
    "links": {
      "order": "https://test.apruve.com/api/v4/orders/730cd103b8e8377359851498e5c34f7b"
    }
  },
  "default_payment_method": {
    "type": "e_check_account",
    "last4": 6789,
    "nickname": "MyCheckingAccount",
    "links": {
      "owner": "https://test.apruve.com/api/v4/users/528f30bce9094d9ea15b476f3dfa3e82"
    }
  },
  "links": {
    "self": "https://test.apruve.com/api/v4/orders/528f30bce9094d9ea15b476f3dfa3e82",
    "customer": "https://test.apruve.com/api/v4/users/528f30bce9094d9ea15b476f3dfa3e82",
    "shopper": "https://test.apruve.com/api/v4/users/528f30bce9094d9ea15b476f3dfa3e82",
    "merchant": "https://test.apruve.com/api/v4/merchants/528f30bce9094d9ea15b476f3dfa3e82",
    "invoices": "https://test.apruve.com/api/v4/orders/528f30bce9094d9ea15b476f3dfa3e82/invoices"
  },
  "finalize_on_create": true,
  "invoice_on_create": true
}
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Body Params

merchant_id
string
required

The unique identifier of the Merchant that owns this Order

shopper_id
required

The unique identifier of the User who placed this order

amount_cents
integer

A positive integer between 0 and 99999999 that represents the expected total amount for this order. This should equal the sum of all order_items, tax_cents, and shipping_cents, but this is not mandatory.

currency
string

Only USD is supported at this time

merchant_order_id
string

The merchant's internal identifier for this Order

tax_cents
integer

Tax amount in cents

shipping_cents
integer

Shipping amount in cents

expire_at
string

ISO8601 date that a pending order should expire. Any order still unapproved at this date will be automatically rejected. This field does not apply once payment terms have started negotiation. Defaults to 45 days if not supplied.

order_items
array of objects
required

OrderItems describing the contents of the order

id
order_id
price_ea_cents
quantity
price_total_cents
currency
title
merchant_notes
description
sku
variant_info
vendor
product_url
links 
payment_term
object

The payment terms proposed/accepted (depending on Order status) for the Order

 
payment_term.corporate_account_id
string
required

ID of the CorporateAccount.

po_number
string

The PO number of this order

finalize_on_create
boolean
invoice_on_create
boolean

Response

OK

Unauthorized

Not Found

List Purchase Orders

Retrieve a list of Purchase Orders created for a merchant. Filterable by merchant_order_id as reflected in the Merchant's integrated e-commerce platform.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://test.apruve.com/api/v4/orders
curl --request GET \
  --url https://test.apruve.com/api/v4/orders
var request = require("request");

var options = { method: 'GET', url: 'https://test.apruve.com/api/v4/orders' };

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

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

url = URI("https://test.apruve.com/api/v4/orders")

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://test.apruve.com/api/v4/orders");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/orders"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "730cd103b8e8377359851498e5c34f7b",
  "merchant_id": "6eaa1367004b78783dbd6ba1c60435f7",
  "customer_id": "2f95ada72c51e7e93f1d5c5266608e6e",
  "shopper_id": "0d276128688e1f99617f8b68aec50b3a",
  "amount_cents": 12345,
  "currency": "USD",
  "status": "pending",
  "merchant_order_id": "1234ABC-DEF",
  "accepts_payment_terms": true,
  "tax_cents": 123,
  "shipping_cents": 456,
  "expire_at": "2016-06-01T13:54:21.000Z",
  "created_at": "2016-06-01T13:54:21.000Z",
  "final_state_at": "2016-06-01T13:54:21.000Z",
  "order_items": [
    {
      "id": "033e74eb10ac3202ca12b9cf21383c3d",
      "order_id": "730cd103b8e8377359851498e5c34f7b",
      "price_ea_cents": 1234,
      "quantity": 1,
      "price_total_cents": 12345,
      "currency": "USD",
      "title": "Widgets",
      "merchant_notes": "foo",
      "description": "bar",
      "sku": "ABC123",
      "variant_info": "baz",
      "vendor": "MyCompany",
      "links": {
        "self": "https://test.apruve.com/api/v4/order_items/033e74eb10ac3202ca12b9cf21383c3d",
        "order": "https://test.apruve.com/api/v4/orders/033e74eb10ac3202ca12b9cf21383c3d"
      }
    }
  ],
  "payment_term": {
    "corporate_account_id": "0b7efd49aa54bf96174a57c43d881a7e",
    "type": "CorporateAccount",
    "status": "approved",
    "escalated_at": "2016-06-01T13:54:21.000Z",
    "final_state_at": "2016-06-01T13:54:21.000Z",
    "links": {
      "order": "https://test.apruve.com/api/v4/orders/730cd103b8e8377359851498e5c34f7b"
    }
  },
  "default_payment_method": {
    "type": "e_check_account",
    "last4": 6789,
    "nickname": "MyCheckingAccount",
    "links": {
      "owner": "https://test.apruve.com/api/v4/users/528f30bce9094d9ea15b476f3dfa3e82"
    }
  },
  "links": {
    "self": "https://test.apruve.com/api/v4/orders/528f30bce9094d9ea15b476f3dfa3e82",
    "customer": "https://test.apruve.com/api/v4/users/528f30bce9094d9ea15b476f3dfa3e82",
    "shopper": "https://test.apruve.com/api/v4/users/528f30bce9094d9ea15b476f3dfa3e82",
    "merchant": "https://test.apruve.com/api/v4/merchants/528f30bce9094d9ea15b476f3dfa3e82",
    "invoices": "https://test.apruve.com/api/v4/orders/528f30bce9094d9ea15b476f3dfa3e82/invoices"
  },
  "finalize_on_create": true,
  "invoice_on_create": true
}
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Query Params

merchant_order_id
string

The ID of the order in the Merchant's e-commerce platform.

page
integer

The page of the query to check, indexed from 1. For example, with page=2 and per_page=15, the results 15 - 29 (inclusive, indexed from 0) are returned.

per_page
integer

Specify how many results per page.

Response

OK

Unauthorized

Not Found

Retrieve an Order

 

Header Auth

 Authentication is required for this endpoint.
gethttps://test.apruve.com/api/v4/orders/id
curl --request GET \
  --url https://test.apruve.com/api/v4/orders/id
var request = require("request");

var options = { method: 'GET',
  url:
   'https://test.apruve.com/api/v4/orders/id' };

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

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

url = URI("https://test.apruve.com/api/v4/orders/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://test.apruve.com/api/v4/orders/id");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/orders/id"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "730cd103b8e8377359851498e5c34f7b",
  "merchant_id": "6eaa1367004b78783dbd6ba1c60435f7",
  "customer_id": "2f95ada72c51e7e93f1d5c5266608e6e",
  "shopper_id": "0d276128688e1f99617f8b68aec50b3a",
  "amount_cents": 12345,
  "currency": "USD",
  "status": "pending",
  "merchant_order_id": "1234ABC-DEF",
  "accepts_payment_terms": true,
  "tax_cents": 123,
  "shipping_cents": 456,
  "expire_at": "2016-06-01T13:54:21.000Z",
  "created_at": "2016-06-01T13:54:21.000Z",
  "final_state_at": "2016-06-01T13:54:21.000Z",
  "order_items": [
    {
      "id": "033e74eb10ac3202ca12b9cf21383c3d",
      "order_id": "730cd103b8e8377359851498e5c34f7b",
      "price_ea_cents": 1234,
      "quantity": 1,
      "price_total_cents": 12345,
      "currency": "USD",
      "title": "Widgets",
      "merchant_notes": "foo",
      "description": "bar",
      "sku": "ABC123",
      "variant_info": "baz",
      "vendor": "MyCompany",
      "links": {
        "self": "https://test.apruve.com/api/v4/order_items/033e74eb10ac3202ca12b9cf21383c3d",
        "order": "https://test.apruve.com/api/v4/orders/033e74eb10ac3202ca12b9cf21383c3d"
      }
    }
  ],
  "payment_term": {
    "corporate_account_id": "0b7efd49aa54bf96174a57c43d881a7e",
    "type": "CorporateAccount",
    "status": "approved",
    "escalated_at": "2016-06-01T13:54:21.000Z",
    "final_state_at": "2016-06-01T13:54:21.000Z",
    "links": {
      "order": "https://test.apruve.com/api/v4/orders/730cd103b8e8377359851498e5c34f7b"
    }
  },
  "default_payment_method": {
    "type": "e_check_account",
    "last4": 6789,
    "nickname": "MyCheckingAccount",
    "links": {
      "owner": "https://test.apruve.com/api/v4/users/528f30bce9094d9ea15b476f3dfa3e82"
    }
  },
  "links": {
    "self": "https://test.apruve.com/api/v4/orders/528f30bce9094d9ea15b476f3dfa3e82",
    "customer": "https://test.apruve.com/api/v4/users/528f30bce9094d9ea15b476f3dfa3e82",
    "shopper": "https://test.apruve.com/api/v4/users/528f30bce9094d9ea15b476f3dfa3e82",
    "merchant": "https://test.apruve.com/api/v4/merchants/528f30bce9094d9ea15b476f3dfa3e82",
    "invoices": "https://test.apruve.com/api/v4/orders/528f30bce9094d9ea15b476f3dfa3e82/invoices"
  },
  "finalize_on_create": true,
  "invoice_on_create": true
}
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Path Params

id
string
required

The ID of the Order

Response

OK

Unauthorized

Not Found

Update an Order

Updates are only allowed before the order has been finalized. This is to prevent unexpected changes to an Order without customer consent. If valid order items are in the payload, it will completely replace the old order items with the contents from the new payload.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://test.apruve.com/api/v4/orders/id
curl --request PUT \
  --url https://test.apruve.com/api/v4/orders/id
var request = require("request");

var options = { method: 'PUT',
  url:
   'https://test.apruve.com/api/v4/orders/id' };

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

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

url = URI("https://test.apruve.com/api/v4/orders/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://test.apruve.com/api/v4/orders/id");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/orders/id"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "730cd103b8e8377359851498e5c34f7b",
  "merchant_id": "6eaa1367004b78783dbd6ba1c60435f7",
  "customer_id": "2f95ada72c51e7e93f1d5c5266608e6e",
  "shopper_id": "0d276128688e1f99617f8b68aec50b3a",
  "amount_cents": 12345,
  "currency": "USD",
  "status": "pending",
  "merchant_order_id": "1234ABC-DEF",
  "accepts_payment_terms": true,
  "tax_cents": 123,
  "shipping_cents": 456,
  "expire_at": "2016-06-01T13:54:21.000Z",
  "created_at": "2016-06-01T13:54:21.000Z",
  "final_state_at": "2016-06-01T13:54:21.000Z",
  "order_items": [
    {
      "id": "033e74eb10ac3202ca12b9cf21383c3d",
      "order_id": "730cd103b8e8377359851498e5c34f7b",
      "price_ea_cents": 1234,
      "quantity": 1,
      "price_total_cents": 12345,
      "currency": "USD",
      "title": "Widgets",
      "merchant_notes": "foo",
      "description": "bar",
      "sku": "ABC123",
      "variant_info": "baz",
      "vendor": "MyCompany",
      "links": {
        "self": "https://test.apruve.com/api/v4/order_items/033e74eb10ac3202ca12b9cf21383c3d",
        "order": "https://test.apruve.com/api/v4/orders/033e74eb10ac3202ca12b9cf21383c3d"
      }
    }
  ],
  "payment_term": {
    "corporate_account_id": "0b7efd49aa54bf96174a57c43d881a7e",
    "type": "CorporateAccount",
    "status": "approved",
    "escalated_at": "2016-06-01T13:54:21.000Z",
    "final_state_at": "2016-06-01T13:54:21.000Z",
    "links": {
      "order": "https://test.apruve.com/api/v4/orders/730cd103b8e8377359851498e5c34f7b"
    }
  },
  "default_payment_method": {
    "type": "e_check_account",
    "last4": 6789,
    "nickname": "MyCheckingAccount",
    "links": {
      "owner": "https://test.apruve.com/api/v4/users/528f30bce9094d9ea15b476f3dfa3e82"
    }
  },
  "links": {
    "self": "https://test.apruve.com/api/v4/orders/528f30bce9094d9ea15b476f3dfa3e82",
    "customer": "https://test.apruve.com/api/v4/users/528f30bce9094d9ea15b476f3dfa3e82",
    "shopper": "https://test.apruve.com/api/v4/users/528f30bce9094d9ea15b476f3dfa3e82",
    "merchant": "https://test.apruve.com/api/v4/merchants/528f30bce9094d9ea15b476f3dfa3e82",
    "invoices": "https://test.apruve.com/api/v4/orders/528f30bce9094d9ea15b476f3dfa3e82/invoices"
  },
  "finalize_on_create": true,
  "invoice_on_create": true
}
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Path Params

id
string
required

The ID of the Order to update

Body Params

merchant_order_id
string

Your remote order identification, usually the ID of the order in your eCommerce system.

amount_cents
integer

A positive integer between 0 and 99999999 that represents the expected total amount for this order. This should equal the sum of all order_items, tax_cents, and shipping_cents, but this is not mandatory.

tax_cents
integer

Tax amount in cents

shipping_cents
integer

Shipping amount in cents

expire_at
string

ISO8601 date that a pending order should expire. Any order still unapproved at this date will be automatically rejected. This field does not apply once payment terms have started negotiation.

order_items
array of objects

OrderItems describing the contents of the order

title
price_ea_cents
quantity
price_total_cents
merchant_notes
description
sku
variant_info
vendor
product_url

Response

OK

Unauthorized

Not Found

Finalize an Order

Finalize is called by the Seller to signal to Apruve that the order is ready to be presented to the customer for confirmation.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://test.apruve.com/api/v4/orders/id/finalize
curl --request POST \
  --url https://test.apruve.com/api/v4/orders/id/finalize
var request = require("request");

var options = { method: 'POST',
  url:
   'https://test.apruve.com/api/v4/orders/id/finalize' };

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

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

url = URI("https://test.apruve.com/api/v4/orders/id/finalize")

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://test.apruve.com/api/v4/orders/id/finalize");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/orders/id/finalize"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "730cd103b8e8377359851498e5c34f7b",
  "merchant_id": "6eaa1367004b78783dbd6ba1c60435f7",
  "customer_id": "2f95ada72c51e7e93f1d5c5266608e6e",
  "shopper_id": "0d276128688e1f99617f8b68aec50b3a",
  "amount_cents": 12345,
  "currency": "USD",
  "status": "pending",
  "merchant_order_id": "1234ABC-DEF",
  "accepts_payment_terms": true,
  "tax_cents": 123,
  "shipping_cents": 456,
  "expire_at": "2016-06-01T13:54:21.000Z",
  "created_at": "2016-06-01T13:54:21.000Z",
  "final_state_at": "2016-06-01T13:54:21.000Z",
  "order_items": [
    {
      "id": "033e74eb10ac3202ca12b9cf21383c3d",
      "order_id": "730cd103b8e8377359851498e5c34f7b",
      "price_ea_cents": 1234,
      "quantity": 1,
      "price_total_cents": 12345,
      "currency": "USD",
      "title": "Widgets",
      "merchant_notes": "foo",
      "description": "bar",
      "sku": "ABC123",
      "variant_info": "baz",
      "vendor": "MyCompany",
      "links": {
        "self": "https://test.apruve.com/api/v4/order_items/033e74eb10ac3202ca12b9cf21383c3d",
        "order": "https://test.apruve.com/api/v4/orders/033e74eb10ac3202ca12b9cf21383c3d"
      }
    }
  ],
  "payment_term": {
    "corporate_account_id": "0b7efd49aa54bf96174a57c43d881a7e",
    "type": "CorporateAccount",
    "status": "approved",
    "escalated_at": "2016-06-01T13:54:21.000Z",
    "final_state_at": "2016-06-01T13:54:21.000Z",
    "links": {
      "order": "https://test.apruve.com/api/v4/orders/730cd103b8e8377359851498e5c34f7b"
    }
  },
  "default_payment_method": {
    "type": "e_check_account",
    "last4": 6789,
    "nickname": "MyCheckingAccount",
    "links": {
      "owner": "https://test.apruve.com/api/v4/users/528f30bce9094d9ea15b476f3dfa3e82"
    }
  },
  "links": {
    "self": "https://test.apruve.com/api/v4/orders/528f30bce9094d9ea15b476f3dfa3e82",
    "customer": "https://test.apruve.com/api/v4/users/528f30bce9094d9ea15b476f3dfa3e82",
    "shopper": "https://test.apruve.com/api/v4/users/528f30bce9094d9ea15b476f3dfa3e82",
    "merchant": "https://test.apruve.com/api/v4/merchants/528f30bce9094d9ea15b476f3dfa3e82",
    "invoices": "https://test.apruve.com/api/v4/orders/528f30bce9094d9ea15b476f3dfa3e82/invoices"
  },
  "finalize_on_create": true,
  "invoice_on_create": true
}
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Path Params

id
string
required

The ID of the Order to finalize

Response

OK

Unauthorized

Not Found

Cancel an Order

Canceling an order signifies that the seller or customer does not want the order to be completed as defined. The order will not be completed and no invoices will be issued.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://test.apruve.com/api/v4/orders/id/cancel
curl --request POST \
  --url https://test.apruve.com/api/v4/orders/id/cancel
var request = require("request");

var options = { method: 'POST',
  url:
   'https://test.apruve.com/api/v4/orders/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://test.apruve.com/api/v4/orders/id/cancel")

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://test.apruve.com/api/v4/orders/id/cancel");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/orders/id/cancel"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "730cd103b8e8377359851498e5c34f7b",
  "merchant_id": "6eaa1367004b78783dbd6ba1c60435f7",
  "customer_id": "2f95ada72c51e7e93f1d5c5266608e6e",
  "shopper_id": "0d276128688e1f99617f8b68aec50b3a",
  "amount_cents": 12345,
  "currency": "USD",
  "status": "pending",
  "merchant_order_id": "1234ABC-DEF",
  "accepts_payment_terms": true,
  "tax_cents": 123,
  "shipping_cents": 456,
  "expire_at": "2016-06-01T13:54:21.000Z",
  "created_at": "2016-06-01T13:54:21.000Z",
  "final_state_at": "2016-06-01T13:54:21.000Z",
  "order_items": [
    {
      "id": "033e74eb10ac3202ca12b9cf21383c3d",
      "order_id": "730cd103b8e8377359851498e5c34f7b",
      "price_ea_cents": 1234,
      "quantity": 1,
      "price_total_cents": 12345,
      "currency": "USD",
      "title": "Widgets",
      "merchant_notes": "foo",
      "description": "bar",
      "sku": "ABC123",
      "variant_info": "baz",
      "vendor": "MyCompany",
      "links": {
        "self": "https://test.apruve.com/api/v4/order_items/033e74eb10ac3202ca12b9cf21383c3d",
        "order": "https://test.apruve.com/api/v4/orders/033e74eb10ac3202ca12b9cf21383c3d"
      }
    }
  ],
  "payment_term": {
    "corporate_account_id": "0b7efd49aa54bf96174a57c43d881a7e",
    "type": "CorporateAccount",
    "status": "approved",
    "escalated_at": "2016-06-01T13:54:21.000Z",
    "final_state_at": "2016-06-01T13:54:21.000Z",
    "links": {
      "order": "https://test.apruve.com/api/v4/orders/730cd103b8e8377359851498e5c34f7b"
    }
  },
  "default_payment_method": {
    "type": "e_check_account",
    "last4": 6789,
    "nickname": "MyCheckingAccount",
    "links": {
      "owner": "https://test.apruve.com/api/v4/users/528f30bce9094d9ea15b476f3dfa3e82"
    }
  },
  "links": {
    "self": "https://test.apruve.com/api/v4/orders/528f30bce9094d9ea15b476f3dfa3e82",
    "customer": "https://test.apruve.com/api/v4/users/528f30bce9094d9ea15b476f3dfa3e82",
    "shopper": "https://test.apruve.com/api/v4/users/528f30bce9094d9ea15b476f3dfa3e82",
    "merchant": "https://test.apruve.com/api/v4/merchants/528f30bce9094d9ea15b476f3dfa3e82",
    "invoices": "https://test.apruve.com/api/v4/orders/528f30bce9094d9ea15b476f3dfa3e82/invoices"
  },
  "finalize_on_create": true,
  "invoice_on_create": true
}
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Path Params

id
string
required

The ID of the Order to cancel

Response

OK

Unauthorized

Not Found

OrderItems

 

Retrieve an OrderItem

 

Header Auth

 Authentication is required for this endpoint.
gethttps://test.apruve.com/api/v4/order_items/id
curl --request GET \
  --url https://test.apruve.com/api/v4/order_items/id
var request = require("request");

var options = { method: 'GET',
  url:
   'https://test.apruve.com/api/v4/order_items/id' };

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

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

url = URI("https://test.apruve.com/api/v4/order_items/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://test.apruve.com/api/v4/order_items/id");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/order_items/id"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "d4b23371725407ba563077d47ca50099",
  "order_id": "549f3affd44dcd1227ca6826e9395a50",
  "price_ea_cents": 1234,
  "quantity": 1,
  "price_total_cents": 12345,
  "currency": "USD",
  "title": "Widgets",
  "merchant_notes": "foo",
  "description": "bar",
  "sku": "ABC123",
  "variant_info": "baz",
  "vendor": "MyCompany",
  "links": {
    "self": "https://test.apruve.com/api/v4/order_items/d4b23371725407ba563077d47ca50099",
    "order": "https://test.apruve.com/api/v4/orders/d4b23371725407ba563077d47ca50099"
  }
}
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Path Params

id
string
required

The ID of the OrderItem

Query Params

page
integer

The page of the query to check, indexed from 1. For example, with page=2 and per_page=15, the results 15 - 29 (inclusive, indexed from 0) are returned.

per_page
integer

Specify how many results per page.

Response

OK

Unauthorized

Not Found

Update an OrderItem

 

Header Auth

 Authentication is required for this endpoint.
puthttps://test.apruve.com/api/v4/order_items/id
curl --request PUT \
  --url https://test.apruve.com/api/v4/order_items/id
var request = require("request");

var options = { method: 'PUT',
  url:
   'https://test.apruve.com/api/v4/order_items/id' };

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

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

url = URI("https://test.apruve.com/api/v4/order_items/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://test.apruve.com/api/v4/order_items/id");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/order_items/id"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "d4b23371725407ba563077d47ca50099",
  "order_id": "549f3affd44dcd1227ca6826e9395a50",
  "price_ea_cents": 1234,
  "quantity": 1,
  "price_total_cents": 12345,
  "currency": "USD",
  "title": "Widgets",
  "merchant_notes": "foo",
  "description": "bar",
  "sku": "ABC123",
  "variant_info": "baz",
  "vendor": "MyCompany",
  "links": {
    "self": "https://test.apruve.com/api/v4/order_items/d4b23371725407ba563077d47ca50099",
    "order": "https://test.apruve.com/api/v4/orders/d4b23371725407ba563077d47ca50099"
  }
}
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Path Params

id
string
required

The ID of the OrderItem to update

Body Params

title
string

Short description of the line item

price_ea_cents
integer

The per-quantity price of the item, in cents

quantity
integer

The item quantity

price_total_cents
integer

Total price for the quantity of items

merchant_notes
string

Notes to the buyer regarding this line item

description
string

Detailed description of the line item

sku
string

SKU for the item

variant_info
string

Information on item options

vendor
string

The maker of the item

product_url
string

URL where the product may be found on the merchant's store

Response

OK

Unauthorized

Not Found

Delete an OrderItem

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://test.apruve.com/api/v4/order_items/id
curl --request DELETE \
  --url https://test.apruve.com/api/v4/order_items/id
var request = require("request");

var options = { method: 'DELETE',
  url:
   'https://test.apruve.com/api/v4/order_items/id' };

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

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

url = URI("https://test.apruve.com/api/v4/order_items/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://test.apruve.com/api/v4/order_items/id");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/order_items/id"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "d4b23371725407ba563077d47ca50099",
  "order_id": "549f3affd44dcd1227ca6826e9395a50",
  "price_ea_cents": 1234,
  "quantity": 1,
  "price_total_cents": 12345,
  "currency": "USD",
  "title": "Widgets",
  "merchant_notes": "foo",
  "description": "bar",
  "sku": "ABC123",
  "variant_info": "baz",
  "vendor": "MyCompany",
  "links": {
    "self": "https://test.apruve.com/api/v4/order_items/d4b23371725407ba563077d47ca50099",
    "order": "https://test.apruve.com/api/v4/orders/d4b23371725407ba563077d47ca50099"
  }
}
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Path Params

id
string
required

The ID of the OrderItem to delete

Response

OK

Unauthorized

Not Found

OrderItems for an Order

 

Header Auth

 Authentication is required for this endpoint.
gethttps://test.apruve.com/api/v4/orders/order_id/order_items
curl --request GET \
  --url https://test.apruve.com/api/v4/orders/order_id/order_items
var request = require("request");

var options = { method: 'GET',
  url:
   'https://test.apruve.com/api/v4/orders/order_id/order_items' };

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

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

url = URI("https://test.apruve.com/api/v4/orders/order_id/order_items")

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://test.apruve.com/api/v4/orders/order_id/order_items");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/orders/order_id/order_items"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "d4b23371725407ba563077d47ca50099",
  "order_id": "549f3affd44dcd1227ca6826e9395a50",
  "price_ea_cents": 1234,
  "quantity": 1,
  "price_total_cents": 12345,
  "currency": "USD",
  "title": "Widgets",
  "merchant_notes": "foo",
  "description": "bar",
  "sku": "ABC123",
  "variant_info": "baz",
  "vendor": "MyCompany",
  "links": {
    "self": "https://test.apruve.com/api/v4/order_items/d4b23371725407ba563077d47ca50099",
    "order": "https://test.apruve.com/api/v4/orders/d4b23371725407ba563077d47ca50099"
  }
}
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Path Params

order_id
string
required

The ID of the Order owning the OrderItems

Query Params

page
integer

The page of the query to check, indexed from 1. For example, with page=2 and per_page=15, the results 15 - 29 (inclusive, indexed from 0) are returned.

per_page
integer

Specify how many results per page.

Response

OK

Unauthorized

Not Found

Add an OrderItem to an Order

 

Header Auth

 Authentication is required for this endpoint.
posthttps://test.apruve.com/api/v4/orders/order_id/order_items
curl --request POST \
  --url https://test.apruve.com/api/v4/orders/order_id/order_items
var request = require("request");

var options = { method: 'POST',
  url:
   'https://test.apruve.com/api/v4/orders/order_id/order_items' };

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

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

url = URI("https://test.apruve.com/api/v4/orders/order_id/order_items")

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://test.apruve.com/api/v4/orders/order_id/order_items");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/orders/order_id/order_items"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "d4b23371725407ba563077d47ca50099",
  "order_id": "549f3affd44dcd1227ca6826e9395a50",
  "price_ea_cents": 1234,
  "quantity": 1,
  "price_total_cents": 12345,
  "currency": "USD",
  "title": "Widgets",
  "merchant_notes": "foo",
  "description": "bar",
  "sku": "ABC123",
  "variant_info": "baz",
  "vendor": "MyCompany",
  "links": {
    "self": "https://test.apruve.com/api/v4/order_items/d4b23371725407ba563077d47ca50099",
    "order": "https://test.apruve.com/api/v4/orders/d4b23371725407ba563077d47ca50099"
  }
}
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Path Params

order_id
string
required

The ID of the Order to add the OrderItem to

Body Params

price_ea_cents
integer

The per-quantity price of the item, in cents

quantity
integer

The item quantity

price_total_cents
integer

Total price for the quantity of items

currency
string

Only USD is supported at this time

title
string
required

Short description of the line item

merchant_notes
string

Notes to the buyer regarding this line item

description
string

Detailed description of the line item

sku
string

SKU for the item

variant_info
string

Information on item options

vendor
string

The maker of the item

product_url
string

URL where the product may be found on the merchant's store

Response

OK

Unauthorized

Not Found

Invoices

 

Retrieve an Invoice

 

Header Auth

 Authentication is required for this endpoint.
gethttps://test.apruve.com/api/v4/invoices/id
curl --request GET \
  --url https://test.apruve.com/api/v4/invoices/id
var request = require("request");

var options = { method: 'GET',
  url:
   'https://test.apruve.com/api/v4/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://test.apruve.com/api/v4/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://test.apruve.com/api/v4/invoices/id");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/invoices/id"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "d76b764c4d0cfe1e9ac9303fcbf3e901",
  "order_id": "9df551f2912d47a9892ee8244479ba60",
  "amount_cents": 42971,
  "currency": "USD",
  "created_at": "2016-06-01T13:54:21.000Z",
  "opened_at": "2016-06-01T13:54:21.000Z",
  "issued_at": "2016-06-01T13:54:21.000Z",
  "status": "pending",
  "final_state_at": "2016-06-01T13:54:21.000Z",
  "amount_due": 42971,
  "shipping_cents": 599,
  "tax_cents": 2772,
  "merchant_notes": "foo",
  "terms_of_delivery": "CIP Destination Airport",
  "footer": "This is a computer generated document; no signature is required. All sales are subject to Terms and Conditions.\n",
  "merchant_invoice_id": "1234ABCD",
  "due_at": "2016-06-01T13:54:21.000Z",
  "invoice_items": [
    {
      "id": "cfde56aee041cdcef1925529088c7f49",
      "price_ea_cents": 19900,
      "quantity": 2,
      "price_total_cents": 39600,
      "tax_cents": 2772,
      "discount_total_cents": 200,
      "tax_rate_percentage": 7,
      "tax_exemption_reason": "Intra-Community supply, 0% VAT / exempt from VAT according to Art. 32, 138 of EU VAT Directive\n",
      "currency": "USD",
      "title": "Widgets",
      "merchant_notes": "foo",
      "description": "bar",
      "sku": "ABC123",
      "variant_info": "baz",
      "vendor": "MyCompany",
      "view_product_url": "http://www.example.com/store/widgets/1234",
      "links": {
        "invoice": "https://test.apruve.com/api/v4/invoices/d76b764c4d0cfe1e9ac9303fcbf3e901",
        "order": "https://test.apruve.com/api/v4/orders/9df551f2912d47a9892ee8244479ba60"
      }
    }
  ],
  "issue_on_create": true,
  "links": {
    "self": "https://test.apruve.com/api/v4/invoices/d76b764c4d0cfe1e9ac9303fcbf3e901",
    "order": "https://test.apruve.com/api/v4/orders/9df551f2912d47a9892ee8244479ba60"
  },
  "bill_to_address": {
    "address_1": "66947 Joshua Trail",
    "address_2": "Suite 305",
    "city": "South Everette",
    "state": "NH",
    "postal_code": "02875",
    "country_code": "US",
    "phone_number": "6123456789",
    "fax_number": "6123456789",
    "contact_name": "Mrs. Wilber Altenwerth",
    "name": "Fay Inc",
    "notes": "Cupiditate quasi debitis non."
  },
  "fiscal_representative": {
    "address_1": "8995 Creola Ville",
    "address_2": "Apt. 945",
    "city": "Friesentown",
    "state": "MN",
    "postal_code": "62685",
    "country_code": "US",
    "phone_number": "6123456789",
    "fax_number": "6123456789",
    "contact_name": "Zelda Pagac",
    "name": "Jacobson, Conn and Kreiger",
    "notes": "Est corrupti quis cumque."
  },
  "remittance_address": {
    "address_1": "7740 Nick Passage",
    "address_2": "Apt. 971",
    "city": "Wisozkburgh",
    "state": "AL",
    "postal_code": "51093",
    "country_code": "US",
    "phone_number": "6123456789",
    "fax_number": "6123456789",
    "contact_name": "Abe Cummerata",
    "name": "Turcotte Inc",
    "notes": "Repellat quia est eius."
  },
  "ship_to_address": {
    "address_1": "3377 Jordon Ways",
    "address_2": "Suite 302",
    "city": "Kossshire",
    "state": "OR",
    "postal_code": "87668",
    "country_code": "US",
    "phone_number": "6123456789",
    "fax_number": "6123456789",
    "contact_name": "Sheldon Schmitt Jr.",
    "name": "Beer, Schmidt and Wisoky",
    "notes": "Aperiam aliquam adipisci voluptates."
  },
  "sold_to_address": {
    "address_1": "120 Natalia Summit",
    "address_2": "Suite 395",
    "city": "East Rendahaven",
    "state": "VT",
    "postal_code": "05063",
    "country_code": "US",
    "phone_number": "6123456789",
    "fax_number": "6123456789",
    "contact_name": "Stephaine Hegmann",
    "name": "Hayes, Streich and Steuber",
    "notes": "Fuga ullam vero porro."
  }
}
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Path Params

id
string
required

The ID of the Invoice

Query Params

page
integer

The page of the query to check, indexed from 1. For example, with page=2 and per_page=15, the results 15 - 29 (inclusive, indexed from 0) are returned.

per_page
integer

Specify how many results per page.

Response

OK

Unauthorized

Not Found

Update an Invoice

Invoices may be updated until they are Issued or Canceled. Once they are issued to the customer they are no longer eligible to be changed.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://test.apruve.com/api/v4/invoices/id
curl --request PUT \
  --url https://test.apruve.com/api/v4/invoices/id
var request = require("request");

var options = { method: 'PUT',
  url:
   'https://test.apruve.com/api/v4/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://test.apruve.com/api/v4/invoices/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://test.apruve.com/api/v4/invoices/id");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/invoices/id"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "d76b764c4d0cfe1e9ac9303fcbf3e901",
  "order_id": "9df551f2912d47a9892ee8244479ba60",
  "amount_cents": 42971,
  "currency": "USD",
  "created_at": "2016-06-01T13:54:21.000Z",
  "opened_at": "2016-06-01T13:54:21.000Z",
  "issued_at": "2016-06-01T13:54:21.000Z",
  "status": "pending",
  "final_state_at": "2016-06-01T13:54:21.000Z",
  "amount_due": 42971,
  "shipping_cents": 599,
  "tax_cents": 2772,
  "merchant_notes": "foo",
  "terms_of_delivery": "CIP Destination Airport",
  "footer": "This is a computer generated document; no signature is required. All sales are subject to Terms and Conditions.\n",
  "merchant_invoice_id": "1234ABCD",
  "due_at": "2016-06-01T13:54:21.000Z",
  "invoice_items": [
    {
      "id": "cfde56aee041cdcef1925529088c7f49",
      "price_ea_cents": 19900,
      "quantity": 2,
      "price_total_cents": 39600,
      "tax_cents": 2772,
      "discount_total_cents": 200,
      "tax_rate_percentage": 7,
      "tax_exemption_reason": "Intra-Community supply, 0% VAT / exempt from VAT according to Art. 32, 138 of EU VAT Directive\n",
      "currency": "USD",
      "title": "Widgets",
      "merchant_notes": "foo",
      "description": "bar",
      "sku": "ABC123",
      "variant_info": "baz",
      "vendor": "MyCompany",
      "view_product_url": "http://www.example.com/store/widgets/1234",
      "links": {
        "invoice": "https://test.apruve.com/api/v4/invoices/d76b764c4d0cfe1e9ac9303fcbf3e901",
        "order": "https://test.apruve.com/api/v4/orders/9df551f2912d47a9892ee8244479ba60"
      }
    }
  ],
  "issue_on_create": true,
  "links": {
    "self": "https://test.apruve.com/api/v4/invoices/d76b764c4d0cfe1e9ac9303fcbf3e901",
    "order": "https://test.apruve.com/api/v4/orders/9df551f2912d47a9892ee8244479ba60"
  },
  "bill_to_address": {
    "address_1": "66947 Joshua Trail",
    "address_2": "Suite 305",
    "city": "South Everette",
    "state": "NH",
    "postal_code": "02875",
    "country_code": "US",
    "phone_number": "6123456789",
    "fax_number": "6123456789",
    "contact_name": "Mrs. Wilber Altenwerth",
    "name": "Fay Inc",
    "notes": "Cupiditate quasi debitis non."
  },
  "fiscal_representative": {
    "address_1": "8995 Creola Ville",
    "address_2": "Apt. 945",
    "city": "Friesentown",
    "state": "MN",
    "postal_code": "62685",
    "country_code": "US",
    "phone_number": "6123456789",
    "fax_number": "6123456789",
    "contact_name": "Zelda Pagac",
    "name": "Jacobson, Conn and Kreiger",
    "notes": "Est corrupti quis cumque."
  },
  "remittance_address": {
    "address_1": "7740 Nick Passage",
    "address_2": "Apt. 971",
    "city": "Wisozkburgh",
    "state": "AL",
    "postal_code": "51093",
    "country_code": "US",
    "phone_number": "6123456789",
    "fax_number": "6123456789",
    "contact_name": "Abe Cummerata",
    "name": "Turcotte Inc",
    "notes": "Repellat quia est eius."
  },
  "ship_to_address": {
    "address_1": "3377 Jordon Ways",
    "address_2": "Suite 302",
    "city": "Kossshire",
    "state": "OR",
    "postal_code": "87668",
    "country_code": "US",
    "phone_number": "6123456789",
    "fax_number": "6123456789",
    "contact_name": "Sheldon Schmitt Jr.",
    "name": "Beer, Schmidt and Wisoky",
    "notes": "Aperiam aliquam adipisci voluptates."
  },
  "sold_to_address": {
    "address_1": "120 Natalia Summit",
    "address_2": "Suite 395",
    "city": "East Rendahaven",
    "state": "VT",
    "postal_code": "05063",
    "country_code": "US",
    "phone_number": "6123456789",
    "fax_number": "6123456789",
    "contact_name": "Stephaine Hegmann",
    "name": "Hayes, Streich and Steuber",
    "notes": "Fuga ullam vero porro."
  }
}
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Path Params

id
string
required

The ID of the Invoice to update

Body Params

amount_cents
integer

The total amount due for this Invoice, in cents. Ideally, this would be the sum of the price of all InvoiceItems, plus tax and shipping amounts, but this is not required.

currency
string

Only USD is supported at this time

shipping_cents
integer

The shipping charge for this Invoice, in cents. Defaults to 0.

tax_cents
integer

The tax charged on this Invoice, in cents. Defaults to 0.

merchant_notes
string

Notes from the merchant to the customer

merchant_invoice_id
string

The merchant's internal identifier for this Invoice

due_at
string

ISO8601 date that payment in full is due. Defaults to immediately.

invoice_items
array of objects

The line items included in this invoice.

id
price_ea_cents
quantity
price_total_cents
currency
title
merchant_notes
description
sku
variant_info
vendor
view_product_url
tax_cents
discount_total_cents
tax_rate_percentage
tax_exemption_reason
links 

Response

OK

Unauthorized

Not Found

Close an Invoice

Invoices may be closed manually if required. Closing an invoice means that you consider it to be paid as it stands. Apruve will not continue to pursue payment from the customer and will return any further checks against this invoice.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://test.apruve.com/api/v4/invoices/id/close
curl --request POST \
  --url https://test.apruve.com/api/v4/invoices/id/close
var request = require("request");

var options = { method: 'POST',
  url:
   'https://test.apruve.com/api/v4/invoices/id/close' };

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

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

url = URI("https://test.apruve.com/api/v4/invoices/id/close")

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://test.apruve.com/api/v4/invoices/id/close");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/invoices/id/close"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "d76b764c4d0cfe1e9ac9303fcbf3e901",
  "order_id": "9df551f2912d47a9892ee8244479ba60",
  "amount_cents": 42971,
  "currency": "USD",
  "created_at": "2016-06-01T13:54:21.000Z",
  "opened_at": "2016-06-01T13:54:21.000Z",
  "issued_at": "2016-06-01T13:54:21.000Z",
  "status": "pending",
  "final_state_at": "2016-06-01T13:54:21.000Z",
  "amount_due": 42971,
  "shipping_cents": 599,
  "tax_cents": 2772,
  "merchant_notes": "foo",
  "terms_of_delivery": "CIP Destination Airport",
  "footer": "This is a computer generated document; no signature is required. All sales are subject to Terms and Conditions.\n",
  "merchant_invoice_id": "1234ABCD",
  "due_at": "2016-06-01T13:54:21.000Z",
  "invoice_items": [
    {
      "id": "cfde56aee041cdcef1925529088c7f49",
      "price_ea_cents": 19900,
      "quantity": 2,
      "price_total_cents": 39600,
      "tax_cents": 2772,
      "discount_total_cents": 200,
      "tax_rate_percentage": 7,
      "tax_exemption_reason": "Intra-Community supply, 0% VAT / exempt from VAT according to Art. 32, 138 of EU VAT Directive\n",
      "currency": "USD",
      "title": "Widgets",
      "merchant_notes": "foo",
      "description": "bar",
      "sku": "ABC123",
      "variant_info": "baz",
      "vendor": "MyCompany",
      "view_product_url": "http://www.example.com/store/widgets/1234",
      "links": {
        "invoice": "https://test.apruve.com/api/v4/invoices/d76b764c4d0cfe1e9ac9303fcbf3e901",
        "order": "https://test.apruve.com/api/v4/orders/9df551f2912d47a9892ee8244479ba60"
      }
    }
  ],
  "issue_on_create": true,
  "links": {
    "self": "https://test.apruve.com/api/v4/invoices/d76b764c4d0cfe1e9ac9303fcbf3e901",
    "order": "https://test.apruve.com/api/v4/orders/9df551f2912d47a9892ee8244479ba60"
  },
  "bill_to_address": {
    "address_1": "66947 Joshua Trail",
    "address_2": "Suite 305",
    "city": "South Everette",
    "state": "NH",
    "postal_code": "02875",
    "country_code": "US",
    "phone_number": "6123456789",
    "fax_number": "6123456789",
    "contact_name": "Mrs. Wilber Altenwerth",
    "name": "Fay Inc",
    "notes": "Cupiditate quasi debitis non."
  },
  "fiscal_representative": {
    "address_1": "8995 Creola Ville",
    "address_2": "Apt. 945",
    "city": "Friesentown",
    "state": "MN",
    "postal_code": "62685",
    "country_code": "US",
    "phone_number": "6123456789",
    "fax_number": "6123456789",
    "contact_name": "Zelda Pagac",
    "name": "Jacobson, Conn and Kreiger",
    "notes": "Est corrupti quis cumque."
  },
  "remittance_address": {
    "address_1": "7740 Nick Passage",
    "address_2": "Apt. 971",
    "city": "Wisozkburgh",
    "state": "AL",
    "postal_code": "51093",
    "country_code": "US",
    "phone_number": "6123456789",
    "fax_number": "6123456789",
    "contact_name": "Abe Cummerata",
    "name": "Turcotte Inc",
    "notes": "Repellat quia est eius."
  },
  "ship_to_address": {
    "address_1": "3377 Jordon Ways",
    "address_2": "Suite 302",
    "city": "Kossshire",
    "state": "OR",
    "postal_code": "87668",
    "country_code": "US",
    "phone_number": "6123456789",
    "fax_number": "6123456789",
    "contact_name": "Sheldon Schmitt Jr.",
    "name": "Beer, Schmidt and Wisoky",
    "notes": "Aperiam aliquam adipisci voluptates."
  },
  "sold_to_address": {
    "address_1": "120 Natalia Summit",
    "address_2": "Suite 395",
    "city": "East Rendahaven",
    "state": "VT",
    "postal_code": "05063",
    "country_code": "US",
    "phone_number": "6123456789",
    "fax_number": "6123456789",
    "contact_name": "Stephaine Hegmann",
    "name": "Hayes, Streich and Steuber",
    "notes": "Fuga ullam vero porro."
  }
}
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Path Params

id
string
required

The ID of the Invoice to close

Response

OK

Unauthorized

Not Found

Cancel an Invoice

Canceling an invoice means that this invoice will not be paid. Any pending payments will be canceled, any checks received after this invoice is canceled will be returned to the sender.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://test.apruve.com/api/v4/invoices/id/cancel
curl --request POST \
  --url https://test.apruve.com/api/v4/invoices/id/cancel
var request = require("request");

var options = { method: 'POST',
  url:
   'https://test.apruve.com/api/v4/invoices/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://test.apruve.com/api/v4/invoices/id/cancel")

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://test.apruve.com/api/v4/invoices/id/cancel");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/invoices/id/cancel"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "d76b764c4d0cfe1e9ac9303fcbf3e901",
  "order_id": "9df551f2912d47a9892ee8244479ba60",
  "amount_cents": 42971,
  "currency": "USD",
  "created_at": "2016-06-01T13:54:21.000Z",
  "opened_at": "2016-06-01T13:54:21.000Z",
  "issued_at": "2016-06-01T13:54:21.000Z",
  "status": "pending",
  "final_state_at": "2016-06-01T13:54:21.000Z",
  "amount_due": 42971,
  "shipping_cents": 599,
  "tax_cents": 2772,
  "merchant_notes": "foo",
  "terms_of_delivery": "CIP Destination Airport",
  "footer": "This is a computer generated document; no signature is required. All sales are subject to Terms and Conditions.\n",
  "merchant_invoice_id": "1234ABCD",
  "due_at": "2016-06-01T13:54:21.000Z",
  "invoice_items": [
    {
      "id": "cfde56aee041cdcef1925529088c7f49",
      "price_ea_cents": 19900,
      "quantity": 2,
      "price_total_cents": 39600,
      "tax_cents": 2772,
      "discount_total_cents": 200,
      "tax_rate_percentage": 7,
      "tax_exemption_reason": "Intra-Community supply, 0% VAT / exempt from VAT according to Art. 32, 138 of EU VAT Directive\n",
      "currency": "USD",
      "title": "Widgets",
      "merchant_notes": "foo",
      "description": "bar",
      "sku": "ABC123",
      "variant_info": "baz",
      "vendor": "MyCompany",
      "view_product_url": "http://www.example.com/store/widgets/1234",
      "links": {
        "invoice": "https://test.apruve.com/api/v4/invoices/d76b764c4d0cfe1e9ac9303fcbf3e901",
        "order": "https://test.apruve.com/api/v4/orders/9df551f2912d47a9892ee8244479ba60"
      }
    }
  ],
  "issue_on_create": true,
  "links": {
    "self": "https://test.apruve.com/api/v4/invoices/d76b764c4d0cfe1e9ac9303fcbf3e901",
    "order": "https://test.apruve.com/api/v4/orders/9df551f2912d47a9892ee8244479ba60"
  },
  "bill_to_address": {
    "address_1": "66947 Joshua Trail",
    "address_2": "Suite 305",
    "city": "South Everette",
    "state": "NH",
    "postal_code": "02875",
    "country_code": "US",
    "phone_number": "6123456789",
    "fax_number": "6123456789",
    "contact_name": "Mrs. Wilber Altenwerth",
    "name": "Fay Inc",
    "notes": "Cupiditate quasi debitis non."
  },
  "fiscal_representative": {
    "address_1": "8995 Creola Ville",
    "address_2": "Apt. 945",
    "city": "Friesentown",
    "state": "MN",
    "postal_code": "62685",
    "country_code": "US",
    "phone_number": "6123456789",
    "fax_number": "6123456789",
    "contact_name": "Zelda Pagac",
    "name": "Jacobson, Conn and Kreiger",
    "notes": "Est corrupti quis cumque."
  },
  "remittance_address": {
    "address_1": "7740 Nick Passage",
    "address_2": "Apt. 971",
    "city": "Wisozkburgh",
    "state": "AL",
    "postal_code": "51093",
    "country_code": "US",
    "phone_number": "6123456789",
    "fax_number": "6123456789",
    "contact_name": "Abe Cummerata",
    "name": "Turcotte Inc",
    "notes": "Repellat quia est eius."
  },
  "ship_to_address": {
    "address_1": "3377 Jordon Ways",
    "address_2": "Suite 302",
    "city": "Kossshire",
    "state": "OR",
    "postal_code": "87668",
    "country_code": "US",
    "phone_number": "6123456789",
    "fax_number": "6123456789",
    "contact_name": "Sheldon Schmitt Jr.",
    "name": "Beer, Schmidt and Wisoky",
    "notes": "Aperiam aliquam adipisci voluptates."
  },
  "sold_to_address": {
    "address_1": "120 Natalia Summit",
    "address_2": "Suite 395",
    "city": "East Rendahaven",
    "state": "VT",
    "postal_code": "05063",
    "country_code": "US",
    "phone_number": "6123456789",
    "fax_number": "6123456789",
    "contact_name": "Stephaine Hegmann",
    "name": "Hayes, Streich and Steuber",
    "notes": "Fuga ullam vero porro."
  }
}
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Path Params

id
string
required

The ID of the Invoice to cancel

Response

OK

Unauthorized

Not Found

Issue an Invoice

Once an invoice is ready to be issued, POST to this action to issue the invoice. This will tell Apruve to try and collect payment from the customer. If the customer has a default electronic payment method on the order, this invoice may be automatically closed. A corporate account must have sufficient credit remaining before issuing an invoice.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://test.apruve.com/api/v4/invoices/id/issue
curl --request POST \
  --url https://test.apruve.com/api/v4/invoices/id/issue
var request = require("request");

var options = { method: 'POST',
  url:
   'https://test.apruve.com/api/v4/invoices/id/issue' };

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

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

url = URI("https://test.apruve.com/api/v4/invoices/id/issue")

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://test.apruve.com/api/v4/invoices/id/issue");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/invoices/id/issue"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "d76b764c4d0cfe1e9ac9303fcbf3e901",
  "order_id": "9df551f2912d47a9892ee8244479ba60",
  "amount_cents": 42971,
  "currency": "USD",
  "created_at": "2016-06-01T13:54:21.000Z",
  "opened_at": "2016-06-01T13:54:21.000Z",
  "issued_at": "2016-06-01T13:54:21.000Z",
  "status": "pending",
  "final_state_at": "2016-06-01T13:54:21.000Z",
  "amount_due": 42971,
  "shipping_cents": 599,
  "tax_cents": 2772,
  "merchant_notes": "foo",
  "terms_of_delivery": "CIP Destination Airport",
  "footer": "This is a computer generated document; no signature is required. All sales are subject to Terms and Conditions.\n",
  "merchant_invoice_id": "1234ABCD",
  "due_at": "2016-06-01T13:54:21.000Z",
  "invoice_items": [
    {
      "id": "cfde56aee041cdcef1925529088c7f49",
      "price_ea_cents": 19900,
      "quantity": 2,
      "price_total_cents": 39600,
      "tax_cents": 2772,
      "discount_total_cents": 200,
      "tax_rate_percentage": 7,
      "tax_exemption_reason": "Intra-Community supply, 0% VAT / exempt from VAT according to Art. 32, 138 of EU VAT Directive\n",
      "currency": "USD",
      "title": "Widgets",
      "merchant_notes": "foo",
      "description": "bar",
      "sku": "ABC123",
      "variant_info": "baz",
      "vendor": "MyCompany",
      "view_product_url": "http://www.example.com/store/widgets/1234",
      "links": {
        "invoice": "https://test.apruve.com/api/v4/invoices/d76b764c4d0cfe1e9ac9303fcbf3e901",
        "order": "https://test.apruve.com/api/v4/orders/9df551f2912d47a9892ee8244479ba60"
      }
    }
  ],
  "issue_on_create": true,
  "links": {
    "self": "https://test.apruve.com/api/v4/invoices/d76b764c4d0cfe1e9ac9303fcbf3e901",
    "order": "https://test.apruve.com/api/v4/orders/9df551f2912d47a9892ee8244479ba60"
  },
  "bill_to_address": {
    "address_1": "66947 Joshua Trail",
    "address_2": "Suite 305",
    "city": "South Everette",
    "state": "NH",
    "postal_code": "02875",
    "country_code": "US",
    "phone_number": "6123456789",
    "fax_number": "6123456789",
    "contact_name": "Mrs. Wilber Altenwerth",
    "name": "Fay Inc",
    "notes": "Cupiditate quasi debitis non."
  },
  "fiscal_representative": {
    "address_1": "8995 Creola Ville",
    "address_2": "Apt. 945",
    "city": "Friesentown",
    "state": "MN",
    "postal_code": "62685",
    "country_code": "US",
    "phone_number": "6123456789",
    "fax_number": "6123456789",
    "contact_name": "Zelda Pagac",
    "name": "Jacobson, Conn and Kreiger",
    "notes": "Est corrupti quis cumque."
  },
  "remittance_address": {
    "address_1": "7740 Nick Passage",
    "address_2": "Apt. 971",
    "city": "Wisozkburgh",
    "state": "AL",
    "postal_code": "51093",
    "country_code": "US",
    "phone_number": "6123456789",
    "fax_number": "6123456789",
    "contact_name": "Abe Cummerata",
    "name": "Turcotte Inc",
    "notes": "Repellat quia est eius."
  },
  "ship_to_address": {
    "address_1": "3377 Jordon Ways",
    "address_2": "Suite 302",
    "city": "Kossshire",
    "state": "OR",
    "postal_code": "87668",
    "country_code": "US",
    "phone_number": "6123456789",
    "fax_number": "6123456789",
    "contact_name": "Sheldon Schmitt Jr.",
    "name": "Beer, Schmidt and Wisoky",
    "notes": "Aperiam aliquam adipisci voluptates."
  },
  "sold_to_address": {
    "address_1": "120 Natalia Summit",
    "address_2": "Suite 395",
    "city": "East Rendahaven",
    "state": "VT",
    "postal_code": "05063",
    "country_code": "US",
    "phone_number": "6123456789",
    "fax_number": "6123456789",
    "contact_name": "Stephaine Hegmann",
    "name": "Hayes, Streich and Steuber",
    "notes": "Fuga ullam vero porro."
  }
}
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Path Params

id
string
required

The ID of the Invoice to issue

Response

OK

Unauthorized

Not Found

Get all Invoices for an Order

 

Header Auth

 Authentication is required for this endpoint.
gethttps://test.apruve.com/api/v4/orders/order_id/invoices
curl --request GET \
  --url https://test.apruve.com/api/v4/orders/order_id/invoices
var request = require("request");

var options = { method: 'GET',
  url:
   'https://test.apruve.com/api/v4/orders/order_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://test.apruve.com/api/v4/orders/order_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://test.apruve.com/api/v4/orders/order_id/invoices");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/orders/order_id/invoices"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

[
  {
    "id": "d76b764c4d0cfe1e9ac9303fcbf3e901",
    "order_id": "9df551f2912d47a9892ee8244479ba60",
    "amount_cents": 42971,
    "currency": "USD",
    "created_at": "2016-06-01T13:54:21.000Z",
    "opened_at": "2016-06-01T13:54:21.000Z",
    "issued_at": "2016-06-01T13:54:21.000Z",
    "status": "pending",
    "final_state_at": "2016-06-01T13:54:21.000Z",
    "amount_due": 42971,
    "shipping_cents": 599,
    "tax_cents": 2772,
    "merchant_notes": "foo",
    "terms_of_delivery": "CIP Destination Airport",
    "footer": "This is a computer generated document; no signature is required. All sales are subject to Terms and Conditions.\n",
    "merchant_invoice_id": "1234ABCD",
    "due_at": "2016-06-01T13:54:21.000Z",
    "invoice_items": [
      {
        "id": "cfde56aee041cdcef1925529088c7f49",
        "price_ea_cents": 19900,
        "quantity": 2,
        "price_total_cents": 39600,
        "tax_cents": 2772,
        "discount_total_cents": 200,
        "tax_rate_percentage": 7,
        "tax_exemption_reason": "Intra-Community supply, 0% VAT / exempt from VAT according to Art. 32, 138 of EU VAT Directive\n",
        "currency": "USD",
        "title": "Widgets",
        "merchant_notes": "foo",
        "description": "bar",
        "sku": "ABC123",
        "variant_info": "baz",
        "vendor": "MyCompany",
        "view_product_url": "http://www.example.com/store/widgets/1234",
        "links": {
          "invoice": "https://test.apruve.com/api/v4/invoices/d76b764c4d0cfe1e9ac9303fcbf3e901",
          "order": "https://test.apruve.com/api/v4/orders/9df551f2912d47a9892ee8244479ba60"
        }
      }
    ],
    "issue_on_create": true,
    "links": {
      "self": "https://test.apruve.com/api/v4/invoices/d76b764c4d0cfe1e9ac9303fcbf3e901",
      "order": "https://test.apruve.com/api/v4/orders/9df551f2912d47a9892ee8244479ba60"
    },
    "bill_to_address": {
      "address_1": "66947 Joshua Trail",
      "address_2": "Suite 305",
      "city": "South Everette",
      "state": "NH",
      "postal_code": "02875",
      "country_code": "US",
      "phone_number": "6123456789",
      "fax_number": "6123456789",
      "contact_name": "Mrs. Wilber Altenwerth",
      "name": "Fay Inc",
      "notes": "Cupiditate quasi debitis non."
    },
    "fiscal_representative": {
      "address_1": "8995 Creola Ville",
      "address_2": "Apt. 945",
      "city": "Friesentown",
      "state": "MN",
      "postal_code": "62685",
      "country_code": "US",
      "phone_number": "6123456789",
      "fax_number": "6123456789",
      "contact_name": "Zelda Pagac",
      "name": "Jacobson, Conn and Kreiger",
      "notes": "Est corrupti quis cumque."
    },
    "remittance_address": {
      "address_1": "7740 Nick Passage",
      "address_2": "Apt. 971",
      "city": "Wisozkburgh",
      "state": "AL",
      "postal_code": "51093",
      "country_code": "US",
      "phone_number": "6123456789",
      "fax_number": "6123456789",
      "contact_name": "Abe Cummerata",
      "name": "Turcotte Inc",
      "notes": "Repellat quia est eius."
    },
    "ship_to_address": {
      "address_1": "3377 Jordon Ways",
      "address_2": "Suite 302",
      "city": "Kossshire",
      "state": "OR",
      "postal_code": "87668",
      "country_code": "US",
      "phone_number": "6123456789",
      "fax_number": "6123456789",
      "contact_name": "Sheldon Schmitt Jr.",
      "name": "Beer, Schmidt and Wisoky",
      "notes": "Aperiam aliquam adipisci voluptates."
    },
    "sold_to_address": {
      "address_1": "120 Natalia Summit",
      "address_2": "Suite 395",
      "city": "East Rendahaven",
      "state": "VT",
      "postal_code": "05063",
      "country_code": "US",
      "phone_number": "6123456789",
      "fax_number": "6123456789",
      "contact_name": "Stephaine Hegmann",
      "name": "Hayes, Streich and Steuber",
      "notes": "Fuga ullam vero porro."
    }
  }
]
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Path Params

order_id
string
required

The ID of the Order owning the Invoices

Query Params

page
integer

The page of the query to check, indexed from 1. For example, with page=2 and per_page=15, the results 15 - 29 (inclusive, indexed from 0) are returned.

per_page
integer

Specify how many results per page.

Response

OK

Unauthorized

Not Found

Add an Invoice to an Order

 

Header Auth

 Authentication is required for this endpoint.
posthttps://test.apruve.com/api/v4/orders/order_id/invoices
curl --request POST \
  --url https://test.apruve.com/api/v4/orders/order_id/invoices
var request = require("request");

var options = { method: 'POST',
  url:
   'https://test.apruve.com/api/v4/orders/order_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://test.apruve.com/api/v4/orders/order_id/invoices")

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://test.apruve.com/api/v4/orders/order_id/invoices");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/orders/order_id/invoices"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "d76b764c4d0cfe1e9ac9303fcbf3e901",
  "order_id": "9df551f2912d47a9892ee8244479ba60",
  "amount_cents": 42971,
  "currency": "USD",
  "created_at": "2016-06-01T13:54:21.000Z",
  "opened_at": "2016-06-01T13:54:21.000Z",
  "issued_at": "2016-06-01T13:54:21.000Z",
  "status": "pending",
  "final_state_at": "2016-06-01T13:54:21.000Z",
  "amount_due": 42971,
  "shipping_cents": 599,
  "tax_cents": 2772,
  "merchant_notes": "foo",
  "terms_of_delivery": "CIP Destination Airport",
  "footer": "This is a computer generated document; no signature is required. All sales are subject to Terms and Conditions.\n",
  "merchant_invoice_id": "1234ABCD",
  "due_at": "2016-06-01T13:54:21.000Z",
  "invoice_items": [
    {
      "id": "cfde56aee041cdcef1925529088c7f49",
      "price_ea_cents": 19900,
      "quantity": 2,
      "price_total_cents": 39600,
      "tax_cents": 2772,
      "discount_total_cents": 200,
      "tax_rate_percentage": 7,
      "tax_exemption_reason": "Intra-Community supply, 0% VAT / exempt from VAT according to Art. 32, 138 of EU VAT Directive\n",
      "currency": "USD",
      "title": "Widgets",
      "merchant_notes": "foo",
      "description": "bar",
      "sku": "ABC123",
      "variant_info": "baz",
      "vendor": "MyCompany",
      "view_product_url": "http://www.example.com/store/widgets/1234",
      "links": {
        "invoice": "https://test.apruve.com/api/v4/invoices/d76b764c4d0cfe1e9ac9303fcbf3e901",
        "order": "https://test.apruve.com/api/v4/orders/9df551f2912d47a9892ee8244479ba60"
      }
    }
  ],
  "issue_on_create": true,
  "links": {
    "self": "https://test.apruve.com/api/v4/invoices/d76b764c4d0cfe1e9ac9303fcbf3e901",
    "order": "https://test.apruve.com/api/v4/orders/9df551f2912d47a9892ee8244479ba60"
  },
  "bill_to_address": {
    "address_1": "66947 Joshua Trail",
    "address_2": "Suite 305",
    "city": "South Everette",
    "state": "NH",
    "postal_code": "02875",
    "country_code": "US",
    "phone_number": "6123456789",
    "fax_number": "6123456789",
    "contact_name": "Mrs. Wilber Altenwerth",
    "name": "Fay Inc",
    "notes": "Cupiditate quasi debitis non."
  },
  "fiscal_representative": {
    "address_1": "8995 Creola Ville",
    "address_2": "Apt. 945",
    "city": "Friesentown",
    "state": "MN",
    "postal_code": "62685",
    "country_code": "US",
    "phone_number": "6123456789",
    "fax_number": "6123456789",
    "contact_name": "Zelda Pagac",
    "name": "Jacobson, Conn and Kreiger",
    "notes": "Est corrupti quis cumque."
  },
  "remittance_address": {
    "address_1": "7740 Nick Passage",
    "address_2": "Apt. 971",
    "city": "Wisozkburgh",
    "state": "AL",
    "postal_code": "51093",
    "country_code": "US",
    "phone_number": "6123456789",
    "fax_number": "6123456789",
    "contact_name": "Abe Cummerata",
    "name": "Turcotte Inc",
    "notes": "Repellat quia est eius."
  },
  "ship_to_address": {
    "address_1": "3377 Jordon Ways",
    "address_2": "Suite 302",
    "city": "Kossshire",
    "state": "OR",
    "postal_code": "87668",
    "country_code": "US",
    "phone_number": "6123456789",
    "fax_number": "6123456789",
    "contact_name": "Sheldon Schmitt Jr.",
    "name": "Beer, Schmidt and Wisoky",
    "notes": "Aperiam aliquam adipisci voluptates."
  },
  "sold_to_address": {
    "address_1": "120 Natalia Summit",
    "address_2": "Suite 395",
    "city": "East Rendahaven",
    "state": "VT",
    "postal_code": "05063",
    "country_code": "US",
    "phone_number": "6123456789",
    "fax_number": "6123456789",
    "contact_name": "Stephaine Hegmann",
    "name": "Hayes, Streich and Steuber",
    "notes": "Fuga ullam vero porro."
  }
}
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Path Params

order_id
string
required

The ID of the Order to add the Invoice to

Body Params

amount_cents
integer
required

The total amount due for this Invoice, in cents. Ideally, this would be the sum of the price of all InvoiceItems, plus tax and shipping amounts, but this is not required.

currency
string

Only USD is supported at this time.

amount_due
integer
shipping_cents
integer

The shipping charge for this Invoice, in cents. Defaults to 0.

tax_cents
integer

The tax charged on this Invoice, in cents. Defaults to 0.

merchant_notes
string

Notes from the merchant to the customer

merchant_invoice_id
string

The merchant's internal identifier for this Invoice.

due_at
string

ISO8601 date that payment in full is due. Defaults to immediately.

invoice_items
array of objects

The line items included in this invoice.

id
price_ea_cents
quantity
price_total_cents
currency
title
merchant_notes
description
sku
variant_info
vendor
view_product_url
tax_cents
discount_total_cents
tax_rate_percentage
tax_exemption_reason
links 
issue_on_create
boolean

If true, the Invoice will be issued to the buyer as soon as it's created. If false, the invoice will not be issued until you explicitly use the Issue action on it.

terms_of_delivery
string

Terms of delivery for the invoice

footer
string

Footer to display at bottom of printed invoices

bill_to_address
object
 
bill_to_address.address_1
string
required
bill_to_address.address_2
string
bill_to_address.city
string
required
bill_to_address.state
string
required
bill_to_address.postal_code
string
required
bill_to_address.country_code
string
required
bill_to_address.phone_number
string
required
bill_to_address.fax_number
string
bill_to_address.contact_name
string
required
bill_to_address.name
string
required
bill_to_address.notes
string
fiscal_representative
object
 
fiscal_representative.address_1
string
required
fiscal_representative.address_2
string
fiscal_representative.city
string
required
fiscal_representative.state
string
required
fiscal_representative.postal_code
string
required
fiscal_representative.country_code
string
required
fiscal_representative.phone_number
string
required
fiscal_representative.fax_number
string
fiscal_representative.contact_name
string
required
fiscal_representative.name
string
required
fiscal_representative.notes
string
remittance_address
object
 
remittance_address.address_1
string
required
remittance_address.address_2
string
remittance_address.city
string
required
remittance_address.state
string
required
remittance_address.postal_code
string
required
remittance_address.country_code
string
required
remittance_address.phone_number
string
required
remittance_address.fax_number
string
remittance_address.contact_name
string
required
remittance_address.name
string
required
remittance_address.notes
string
ship_to_address
object
 
ship_to_address.address_1
string
required
ship_to_address.address_2
string
ship_to_address.city
string
required
ship_to_address.state
string
required
ship_to_address.postal_code
string
required
ship_to_address.country_code
string
required
ship_to_address.phone_number
string
required
ship_to_address.fax_number
string
ship_to_address.contact_name
string
required
ship_to_address.name
string
required
ship_to_address.notes
string
sold_to_address
object
 
sold_to_address.address_1
string
required
sold_to_address.address_2
string
sold_to_address.city
string
required
sold_to_address.state
string
required
sold_to_address.postal_code
string
required
sold_to_address.country_code
string
required
sold_to_address.phone_number
string
required
sold_to_address.fax_number
string
sold_to_address.contact_name
string
required
sold_to_address.name
string
required
sold_to_address.notes
string

Response

OK

Unauthorized

Not Found

Shipments

 

Retrieve a list of Shipments for an Invoice

 

Header Auth

 Authentication is required for this endpoint.
gethttps://test.apruve.com/api/v4/invoices/invoice_id/shipments
curl --request GET \
  --url https://test.apruve.com/api/v4/invoices/invoice_id/shipments
var request = require("request");

var options = { method: 'GET',
  url:
   'https://test.apruve.com/api/v4/invoices/invoice_id/shipments' };

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

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

url = URI("https://test.apruve.com/api/v4/invoices/invoice_id/shipments")

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://test.apruve.com/api/v4/invoices/invoice_id/shipments");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/invoices/invoice_id/shipments"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "91ac96c0ffc9577ecb634ad726b1874e",
  "invoice_id": "2d1bd4f93a1b9ed034e36783adb29bed",
  "amount_cents": 12345678,
  "tax_cents": 12345678,
  "shipping_cents": 12345678,
  "currency": "USD",
  "shipper": "MyShippingCo",
  "tracking_number": "1234abcd",
  "shipped_at": "2016-06-01T13:54:21.000Z",
  "delivered_at": "2016-06-01T13:54:21.000Z",
  "merchant_notes": "foo",
  "status": "fulfilled",
  "merchant_shipment_id": 12345,
  "shipment_items": [
    {
      "id": "833277421d30abdcf0880e4f3d233729",
      "shipment_id": "91ac96c0ffc9577ecb634ad726b1874e",
      "price_ea_cents": 1234,
      "quantity": 1,
      "price_total_cents": 12345,
      "tax_cents": 5,
      "shipping_cents": 5,
      "currency": "USD",
      "title": "Widgets",
      "merchant_notes": "foo",
      "description": "bar",
      "sku": "ABC123",
      "variant_info": "baz",
      "vendor": "MyCompany"
    }
  ]
}
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Path Params

invoice_id
string
required

The ID of the Invoice owning the Shipments

Query Params

page
integer

The page of the query to check, indexed from 1. For example, with page=2 and per_page=15, the results 15 - 29 (inclusive, indexed from 0) are returned.

per_page
integer

Specify how many results per page.

Response

OK

Unauthorized

Not Found

Create a Shipment

 

Header Auth

 Authentication is required for this endpoint.
posthttps://test.apruve.com/api/v4/invoices/invoice_id/shipments
curl --request POST \
  --url https://test.apruve.com/api/v4/invoices/invoice_id/shipments
var request = require("request");

var options = { method: 'POST',
  url:
   'https://test.apruve.com/api/v4/invoices/invoice_id/shipments' };

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

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

url = URI("https://test.apruve.com/api/v4/invoices/invoice_id/shipments")

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://test.apruve.com/api/v4/invoices/invoice_id/shipments");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/invoices/invoice_id/shipments"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "91ac96c0ffc9577ecb634ad726b1874e",
  "invoice_id": "2d1bd4f93a1b9ed034e36783adb29bed",
  "amount_cents": 12345678,
  "tax_cents": 12345678,
  "shipping_cents": 12345678,
  "currency": "USD",
  "shipper": "MyShippingCo",
  "tracking_number": "1234abcd",
  "shipped_at": "2016-06-01T13:54:21.000Z",
  "delivered_at": "2016-06-01T13:54:21.000Z",
  "merchant_notes": "foo",
  "status": "fulfilled",
  "merchant_shipment_id": 12345,
  "shipment_items": [
    {
      "id": "833277421d30abdcf0880e4f3d233729",
      "shipment_id": "91ac96c0ffc9577ecb634ad726b1874e",
      "price_ea_cents": 1234,
      "quantity": 1,
      "price_total_cents": 12345,
      "tax_cents": 5,
      "shipping_cents": 5,
      "currency": "USD",
      "title": "Widgets",
      "merchant_notes": "foo",
      "description": "bar",
      "sku": "ABC123",
      "variant_info": "baz",
      "vendor": "MyCompany"
    }
  ]
}
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Path Params

invoice_id
string
required

The ID of the Invoice owning the Shipments

Body Params

amount_cents
integer

The total amount, in cents, of the items in the shipment. Ideally, this would be the sum of the price of all ShipmentItems, plus tax and shipping amounts, but this is not required. The amount_cents is used as the shipment total if it is supplied. Otherwise, the total will be calculated from the other values.

tax_cents
integer

The total tax amount, in cents, of the taxes for this shipment.

shipping_cents
integer

The total shipping amount, in cents, for the shipping charges for this shipment.

currency
string

Only USD is supported at this time.

shipper
string

The name of the shipping company

tracking_number
string

The tracking number from the shipper

shipped_at
string
required

The ISO8601 date that the shipment was sent

delivered_at
string

The ISO8601 date which represents when the shipment was delivered to the customer

merchant_notes
string

Notes from the merchant to the customer

status
string

The status of the shipment. Indicates if this shipment fulfills all the items on the invoice.

merchant_shipment_id
string

Optional shipment ID from the merchant's system

shipment_items
array of objects

The items included in this Shipment

id
shipment_id
title
description
quantity
price_ea_cents
tax_cents
shipping_cents
price_total_cents
currency
merchant_notes
sku
variant_info
vendor

Response

OK

Unauthorized

Not Found

Retrieve a Shipment

 

Header Auth

 Authentication is required for this endpoint.
gethttps://test.apruve.com/api/v4/invoices/invoice_id/shipments/id
curl --request GET \
  --url https://test.apruve.com/api/v4/invoices/invoice_id/shipments/id
var request = require("request");

var options = { method: 'GET',
  url:
   'https://test.apruve.com/api/v4/invoices/invoice_id/shipments/id' };

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

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

url = URI("https://test.apruve.com/api/v4/invoices/invoice_id/shipments/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://test.apruve.com/api/v4/invoices/invoice_id/shipments/id");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/invoices/invoice_id/shipments/id"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "91ac96c0ffc9577ecb634ad726b1874e",
  "invoice_id": "2d1bd4f93a1b9ed034e36783adb29bed",
  "amount_cents": 12345678,
  "tax_cents": 12345678,
  "shipping_cents": 12345678,
  "currency": "USD",
  "shipper": "MyShippingCo",
  "tracking_number": "1234abcd",
  "shipped_at": "2016-06-01T13:54:21.000Z",
  "delivered_at": "2016-06-01T13:54:21.000Z",
  "merchant_notes": "foo",
  "status": "fulfilled",
  "merchant_shipment_id": 12345,
  "shipment_items": [
    {
      "id": "833277421d30abdcf0880e4f3d233729",
      "shipment_id": "91ac96c0ffc9577ecb634ad726b1874e",
      "price_ea_cents": 1234,
      "quantity": 1,
      "price_total_cents": 12345,
      "tax_cents": 5,
      "shipping_cents": 5,
      "currency": "USD",
      "title": "Widgets",
      "merchant_notes": "foo",
      "description": "bar",
      "sku": "ABC123",
      "variant_info": "baz",
      "vendor": "MyCompany"
    }
  ]
}
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Path Params

invoice_id
string
required

The ID of the Invoice owning the Shipment

id
string
required

The ID of the Shipment

Response

OK

Unauthorized

Not Found

Update a Shipment

 

Header Auth

 Authentication is required for this endpoint.
puthttps://test.apruve.com/api/v4/invoices/invoice_id/shipments/id
curl --request PUT \
  --url https://test.apruve.com/api/v4/invoices/invoice_id/shipments/id
var request = require("request");

var options = { method: 'PUT',
  url:
   'https://test.apruve.com/api/v4/invoices/invoice_id/shipments/id' };

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

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

url = URI("https://test.apruve.com/api/v4/invoices/invoice_id/shipments/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://test.apruve.com/api/v4/invoices/invoice_id/shipments/id");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/invoices/invoice_id/shipments/id"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "91ac96c0ffc9577ecb634ad726b1874e",
  "invoice_id": "2d1bd4f93a1b9ed034e36783adb29bed",
  "amount_cents": 12345678,
  "tax_cents": 12345678,
  "shipping_cents": 12345678,
  "currency": "USD",
  "shipper": "MyShippingCo",
  "tracking_number": "1234abcd",
  "shipped_at": "2016-06-01T13:54:21.000Z",
  "delivered_at": "2016-06-01T13:54:21.000Z",
  "merchant_notes": "foo",
  "status": "fulfilled",
  "merchant_shipment_id": 12345,
  "shipment_items": [
    {
      "id": "833277421d30abdcf0880e4f3d233729",
      "shipment_id": "91ac96c0ffc9577ecb634ad726b1874e",
      "price_ea_cents": 1234,
      "quantity": 1,
      "price_total_cents": 12345,
      "tax_cents": 5,
      "shipping_cents": 5,
      "currency": "USD",
      "title": "Widgets",
      "merchant_notes": "foo",
      "description": "bar",
      "sku": "ABC123",
      "variant_info": "baz",
      "vendor": "MyCompany"
    }
  ]
}
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Path Params

invoice_id
string
required

The ID of the Invoice owning the Shipment

id
string
required

The ID of the Shipment

Body Params

amount_cents
integer

The total amount, in cents, of the items in the shipment. Ideally, this would be the sum of the price of all ShipmentItems, plus tax and shipping amounts, but this is not required. The amount_cents is used as the shipment total if it is supplied. Otherwise, the total will be calculated from the other values.

tax_cents
integer

The total tax amount, in cents, of the taxes for this shipment.

shipping_cents
integer

The total shipping amount, in cents, for the shipping charges for this shipment.

currency
string

Only USD is supported at this time.

shipper
string

The name of the shipping company

tracking_number
string

The tracking number from the shipper

shipped_at
string
required

The ISO8601 date that the shipment was sent

delivered_at
string

The ISO8601 date which represents when the shipment was delivered to the customer

merchant_notes
string

Notes from the merchant to the customer

status
string

The status of the shipment. Indicates if this shipment fulfills all the items on the invoice.

merchant_shipment_id
string

Optional shipment ID from the merchant's system

shipment_items
array of objects

The items included in this Shipment

id
shipment_id
title
description
quantity
price_ea_cents
tax_cents
shipping_cents
price_total_cents
currency
merchant_notes
sku
variant_info
vendor

Response

OK

Unauthorized

Not Found

Returns

 

List Returns

Retrieve a list of Returns for an Invoice

 

Header Auth

 Authentication is required for this endpoint.
gethttps://test.apruve.com/api/v4/invoices/invoice_id/invoice_returns
curl --request GET \
  --url https://test.apruve.com/api/v4/invoices/invoice_id/invoice_returns
var request = require("request");

var options = { method: 'GET',
  url:
   'https://test.apruve.com/api/v4/invoices/invoice_id/invoice_returns' };

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

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

url = URI("https://test.apruve.com/api/v4/invoices/invoice_id/invoice_returns")

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://test.apruve.com/api/v4/invoices/invoice_id/invoice_returns");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/invoices/invoice_id/invoice_returns"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "bfb0229c4babf4f1ad03c712fe67e92e",
  "invoice_id": "9b9e963546c0b47c696989be43b099a7",
  "amount_cents": 12345678,
  "currency": "USD",
  "reason": "DAMAGED",
  "merchant_id": "2dc093c0c2584c544cdaf9d8d5d78bbc"
}
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Path Params

invoice_id
string
required

The ID of the Invoice owning the Returns

Query Params

page
integer

The page of the query to check, indexed from 1. For example, with page=2 and per_page=15, the results 15 - 29 (inclusive, indexed from 0) are returned.

per_page
integer

Specify how many results per page.

Response

OK

Unauthorized

Not Found

Create a Return

 

Header Auth

 Authentication is required for this endpoint.
posthttps://test.apruve.com/api/v4/invoices/invoice_id/invoice_returns
curl --request POST \
  --url https://test.apruve.com/api/v4/invoices/invoice_id/invoice_returns
var request = require("request");

var options = { method: 'POST',
  url:
   'https://test.apruve.com/api/v4/invoices/invoice_id/invoice_returns' };

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

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

url = URI("https://test.apruve.com/api/v4/invoices/invoice_id/invoice_returns")

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://test.apruve.com/api/v4/invoices/invoice_id/invoice_returns");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/invoices/invoice_id/invoice_returns"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "bfb0229c4babf4f1ad03c712fe67e92e",
  "invoice_id": "9b9e963546c0b47c696989be43b099a7",
  "amount_cents": 12345678,
  "currency": "USD",
  "reason": "DAMAGED",
  "merchant_id": "2dc093c0c2584c544cdaf9d8d5d78bbc"
}
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Path Params

invoice_id
string
required

The ID of the Invoice owning the Returns

Body Params

amount_cents
integer
required

The total amount, in cents, of the invoice return. The amount of the return must be less than the invoice total.

currency
string

Only USD is supported at this time

reason
string
required

Reason for the invoice return. Acceptable values are 'REFUSED', 'DAMAGED', 'DEFECTIVE', 'DUPLICATE', 'CONSIGNMENT' & 'OTHER'.

Response

OK

Unauthorized

Not Found

Retrieve a Return

 

Header Auth

 Authentication is required for this endpoint.
gethttps://test.apruve.com/api/v4/invoices/invoice_id/invoice_returns/id
curl --request GET \
  --url https://test.apruve.com/api/v4/invoices/invoice_id/invoice_returns/id
var request = require("request");

var options = { method: 'GET',
  url:
   'https://test.apruve.com/api/v4/invoices/invoice_id/invoice_returns/id' };

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

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

url = URI("https://test.apruve.com/api/v4/invoices/invoice_id/invoice_returns/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://test.apruve.com/api/v4/invoices/invoice_id/invoice_returns/id");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/invoices/invoice_id/invoice_returns/id"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "bfb0229c4babf4f1ad03c712fe67e92e",
  "invoice_id": "9b9e963546c0b47c696989be43b099a7",
  "amount_cents": 12345678,
  "currency": "USD",
  "reason": "DAMAGED",
  "merchant_id": "2dc093c0c2584c544cdaf9d8d5d78bbc"
}
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Path Params

invoice_id
string
required

The ID of the Invoice owning the Returns

id
string
required

The ID of the Invoice Return

Response

OK

Unauthorized

Not Found

Amend a Return

 

Header Auth

 Authentication is required for this endpoint.
puthttps://test.apruve.com/api/v4/invoices/invoice_id/invoice_returns/id
curl --request PUT \
  --url https://test.apruve.com/api/v4/invoices/invoice_id/invoice_returns/id
var request = require("request");

var options = { method: 'PUT',
  url:
   'https://test.apruve.com/api/v4/invoices/invoice_id/invoice_returns/id' };

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

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

url = URI("https://test.apruve.com/api/v4/invoices/invoice_id/invoice_returns/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://test.apruve.com/api/v4/invoices/invoice_id/invoice_returns/id");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/invoices/invoice_id/invoice_returns/id"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "bfb0229c4babf4f1ad03c712fe67e92e",
  "invoice_id": "9b9e963546c0b47c696989be43b099a7",
  "amount_cents": 12345678,
  "currency": "USD",
  "reason": "DAMAGED",
  "merchant_id": "2dc093c0c2584c544cdaf9d8d5d78bbc"
}
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Path Params

invoice_id
string
required

The ID of the Invoice owning the Returns

id
string
required

The ID of the Invoice Return

Body Params

amount_cents
integer
required

The total amount, in cents, of the invoice return. The amount of the return must be less than the invoice total.

currency
string

Only USD is supported at this time

reason
string
required

Reason for the invoice return. Acceptable values are 'REFUSED', 'DAMAGED', 'DEFECTIVE', 'DUPLICATE', 'CONSIGNMENT' & 'OTHER'.

Response

OK

Unauthorized

Not Found

Merchants

 

Retrieve a Merchant

 

Header Auth

 Authentication is required for this endpoint.
gethttps://test.apruve.com/api/v4/merchants/id/
curl --request GET \
  --url https://test.apruve.com/api/v4/merchants/id/
var request = require("request");

var options = { method: 'GET',
  url:
   'https://test.apruve.com/api/v4/merchants/id/' };

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

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

url = URI("https://test.apruve.com/api/v4/merchants/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://test.apruve.com/api/v4/merchants/id/");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/merchants/id/"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "c93e17c64a916f0736acb6ab9c177380",
  "name": "Joe Merchant",
  "email": "joemerchant@example.com",
  "web_url": "http://www.example.com/store",
  "phone": "555-555-1212"
}
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Path Params

id
string
required

The ID of the Merchant

Response

OK

Unauthorized

Not Found

Retrieve a Merchant's Corporate Accounts

 

Header Auth

 Authentication is required for this endpoint.
gethttps://test.apruve.com/api/v4/merchants/id/corporate_accounts
curl --request GET \
  --url https://test.apruve.com/api/v4/merchants/id/corporate_accounts
var request = require("request");

var options = { method: 'GET',
  url:
   'https://test.apruve.com/api/v4/merchants/id/corporate_accounts' };

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

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

url = URI("https://test.apruve.com/api/v4/merchants/id/corporate_accounts")

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://test.apruve.com/api/v4/merchants/id/corporate_accounts");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/merchants/id/corporate_accounts"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "d9e10e59140513b61998e292088c8194",
  "merchant_uuid": "5ca2ab51d10b490cba7b22934c9fe913",
  "customer_uuid": "b76ac505389e7814eb10fb4fdc33a50b",
  "type": "corporate",
  "payment_term_strategy_name": "Net30",
  "name": "MyCorporateAccount",
  "authorized_buyers": [
    {
      "id": "d9e10e59140513b61998e292088c8194",
      "name": "MyCorporateAccount",
      "email": "buyer@example.com"
    }
  ]
}
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Path Params

id
string
required

The ID of the Merchant

Query Params

email
string

The email address of the corporate account user

page
integer

The page of the query to check, indexed from 1. For example, with page=2 and per_page=15, the results 15 - 29 (inclusive, indexed from 0) are returned.

per_page
integer

Specify how many results per page.

Response

OK

Unauthorized

Not Found

Retrieve a Merchant Corporate Account

 

Header Auth

 Authentication is required for this endpoint.
gethttps://test.apruve.com/api/v4/merchants/merchant_id/corporate_accounts/id
curl --request GET \
  --url https://test.apruve.com/api/v4/merchants/merchant_id/corporate_accounts/id
var request = require("request");

var options = { method: 'GET',
  url:
   'https://test.apruve.com/api/v4/merchants/merchant_id/corporate_accounts/id' };

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

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

url = URI("https://test.apruve.com/api/v4/merchants/merchant_id/corporate_accounts/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://test.apruve.com/api/v4/merchants/merchant_id/corporate_accounts/id");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/merchants/merchant_id/corporate_accounts/id"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "d9e10e59140513b61998e292088c8194",
  "merchant_uuid": "5ca2ab51d10b490cba7b22934c9fe913",
  "customer_uuid": "b76ac505389e7814eb10fb4fdc33a50b",
  "type": "corporate",
  "payment_term_strategy_name": "Net30",
  "name": "MyCorporateAccount",
  "authorized_buyers": [
    {
      "id": "d9e10e59140513b61998e292088c8194",
      "name": "MyCorporateAccount",
      "email": "buyer@example.com"
    }
  ]
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Path Params

merchant_id
string
required

The ID of the Merchant

id
string
required

The ID of the Corporate Account

Response

OK

Not Found

WebhookEndpoints

 

Retrieve all WebhookEndpoints for a Merchant

Get a list of webhook endpoints associated with your merchant account.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://test.apruve.com/api/v4/merchants/merchant_id/webhook_endpoints
curl --request GET \
  --url https://test.apruve.com/api/v4/merchants/merchant_id/webhook_endpoints
var request = require("request");

var options = { method: 'GET',
  url:
   'https://test.apruve.com/api/v4/merchants/merchant_id/webhook_endpoints' };

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

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

url = URI("https://test.apruve.com/api/v4/merchants/merchant_id/webhook_endpoints")

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://test.apruve.com/api/v4/merchants/merchant_id/webhook_endpoints");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/merchants/merchant_id/webhook_endpoints"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "10482943180fd4aa0db6c99205fc7dd6",
  "version": "v4",
  "url": "https://api.example.com/apruve/webhook",
  "auth_header": "Bearer 4177db26d57aa07d73c7f14fb1f620f9"
}
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Path Params

merchant_id
string
required

The ID of your merchant account

Response

OK

Unauthorized

Not Found

Add a WebhookEndpoint to a Merchant

Add a webhook endpoint to your merchant account.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://test.apruve.com/api/v4/merchants/merchant_id/webhook_endpoints
curl --request POST \
  --url https://test.apruve.com/api/v4/merchants/merchant_id/webhook_endpoints
var request = require("request");

var options = { method: 'POST',
  url:
   'https://test.apruve.com/api/v4/merchants/merchant_id/webhook_endpoints' };

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

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

url = URI("https://test.apruve.com/api/v4/merchants/merchant_id/webhook_endpoints")

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://test.apruve.com/api/v4/merchants/merchant_id/webhook_endpoints");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/merchants/merchant_id/webhook_endpoints"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "10482943180fd4aa0db6c99205fc7dd6",
  "version": "v4",
  "url": "https://api.example.com/apruve/webhook",
  "auth_header": "Bearer 4177db26d57aa07d73c7f14fb1f620f9"
}
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Path Params

merchant_id
string
required

The ID of your merchant account

Body Params

version
string
required

The webhook version the endpoint should receive: * v4 - (default) The endpoint should receive Apruve REST API version 4 webhooks

url
string
required

The URL that should receive the webhook

auth_header
string

Any Authorization headers necessary to ensure receipt of the webhook.

Response

OK

Unauthorized

Not Found

Retrieve a WebhookEndpoint

Get a specific webhook endpoint associated with your merchant account.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://test.apruve.com/api/v4/merchants/merchant_id/webhook_endpoints/id
curl --request GET \
  --url https://test.apruve.com/api/v4/merchants/merchant_id/webhook_endpoints/id
var request = require("request");

var options = { method: 'GET',
  url:
   'https://test.apruve.com/api/v4/merchants/merchant_id/webhook_endpoints/id' };

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

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

url = URI("https://test.apruve.com/api/v4/merchants/merchant_id/webhook_endpoints/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://test.apruve.com/api/v4/merchants/merchant_id/webhook_endpoints/id");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/merchants/merchant_id/webhook_endpoints/id"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "10482943180fd4aa0db6c99205fc7dd6",
  "version": "v4",
  "url": "https://api.example.com/apruve/webhook",
  "auth_header": "Bearer 4177db26d57aa07d73c7f14fb1f620f9"
}
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Path Params

merchant_id
string
required

The ID of your merchant account

id
string
required

The ID of the WebhookEndpoint

Response

OK

Unauthorized

Not Found

Remove a WebhookEndpoint

Remove a webhook endpoint from your merchant account.

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://test.apruve.com/api/v4/merchants/merchant_id/webhook_endpoints/id
curl --request DELETE \
  --url https://test.apruve.com/api/v4/merchants/merchant_id/webhook_endpoints/id
var request = require("request");

var options = { method: 'DELETE',
  url:
   'https://test.apruve.com/api/v4/merchants/merchant_id/webhook_endpoints/id' };

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

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

url = URI("https://test.apruve.com/api/v4/merchants/merchant_id/webhook_endpoints/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://test.apruve.com/api/v4/merchants/merchant_id/webhook_endpoints/id");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/merchants/merchant_id/webhook_endpoints/id"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "10482943180fd4aa0db6c99205fc7dd6",
  "version": "v4",
  "url": "https://api.example.com/apruve/webhook",
  "auth_header": "Bearer 4177db26d57aa07d73c7f14fb1f620f9"
}
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Path Params

merchant_id
string
required

The ID of your merchant account

id
string
required

The ID of the WebhookEndpoint

Response

OK

Unauthorized

Not Found

Users

 

Retrieve a User

 

Header Auth

 Authentication is required for this endpoint.
gethttps://test.apruve.com/api/v4/users/id/
curl --request GET \
  --url https://test.apruve.com/api/v4/users/id/
var request = require("request");

var options = { method: 'GET',
  url:
   'https://test.apruve.com/api/v4/users/id/' };

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

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

url = URI("https://test.apruve.com/api/v4/users/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://test.apruve.com/api/v4/users/id/");

xhr.send(data);
import requests

url = "https://test.apruve.com/api/v4/users/id/"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "dbb016109d0ba540088f5102dcf66f5e",
  "name": "Sam Smith",
  "email": "cardholder@example.com"
}
{
  "error": "You need to login or sign up before continuing."
}
{
  "errors": [
    {
      "title": "Not Found"
    }
  ]
}

Path Params

id
string
required

The ID of the User

Response

OK

Unauthorized

Not Found