Order Pack
If you are using "packs" as part of your billing arrangements with Xtracta, you can use this endpoint to order usage packs.
Booster Packs: Packs provide additional document processing capacity on top of your existing plan. They are one-time purchases that add to your available document count immediately.
POST Parameters
| Parameter | Required | Value | Description |
|---|---|---|---|
api_key | {key} | An API key that has access to the resource you want to query for | |
pack_id | {integer} | The ID of the booster pack you wish to order | |
quantity | {integer} | The quantity of packs to order (default: 1) | |
purge | delete, process | Decide what to do with documents on hold: process to release them, delete to remove them | |
group_id | {integer} | The group to apply the pack to. If not specified, uses the API key's group |
Response Information
| Element | Description |
|---|---|
<status> | A boolean (true OR false) as to whether the operation succeeded. |
<message> | Additional information about the operation. If the <result> was false this will provide brief information about the <error_code> as well as additional supplemental information about the specific query. |
<pack> | Contains information about the newly ordered pack |
<pack>→<id> | The Id of the newly ordered pack |
<pack>→<plan_name> | The name of the newly ordered pack |
<pack>→<allowed_documents> | The number of documents allowed within the newly ordered pack |
<pack>→<price> | The price of the new pack (end user price) |
<pack>→<quantity> | The quantity of the pack(s) ordered |
<pack>→<group_id> | The group Id the pack has been assigned to |
<pack_summary> | A container for inform |
<pack_summary>→<total_used_documents> | |
<pack_summary>→<total_available_documents> |
Example
Sample Request
POST https://api-app.xtracta.com/v1/billings/booster HTTP/1.1 api_key=123&pack_id=1223&purge=process
Sample Response
<?xml version="1.0" encoding="UTF-8"?>
<billings_response>
<status>200</status>
<message>Booster Pack order successful</message>
<pack>
<id>1</id>
<plan_name>Booster 100</plan_name>
<allowed_documents>100</allowed_documents>
<price>99</price>
<quantity>2</quantity>
<group_id>494</group_id>
</pack>
<pack_summary>
<total_used_documents>0</total_used_documents>
<total_available_documents>200</total_available_documents>
</pack_summary>
</billings_response>
Schema Definition
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:simpleType name="ConfidenceType">
<xs:union>
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="100"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value=""/>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
<xs:complexType name="PackType">
<xs:sequence>
<xs:element name="id" type="xs:positiveInteger"/>
<xs:element name="plan_name" type="xs:string"/>
<xs:element name="allowed_documents" type="xs:nonNegativeInteger"/>
<xs:element name="price" type="xs:decimal"/>
<xs:element name="quantity" type="xs:nonNegativeInteger"/>
<xs:element name="group_id" type="xs:positiveInteger" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PacksummaryType">
<xs:sequence>
<xs:element name="total_used_documents" type="xs:nonNegativeInteger"/>
<xs:element name="total_available_documents" type="xs:nonNegativeInteger"/>
</xs:sequence>
</xs:complexType>
<xs:element name="billings_response">
<xs:complexType>
<xs:sequence>
<xs:element name="status" type="xs:positiveInteger" minOccurs="0"/>
<xs:element name="message" type="xs:string"/>
<xs:element name="pack" type="PackType"/>
<xs:element name="pack_summary" type="PacksummaryType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>