Introduction
We provide a REST API to help you create postage labels with your application. To get started, you will need to register and create API access.
Authentication
Once you've registered and created your API access, you will have access to your API key and secret. These are required when making calls to the API. You can have multiple API access codes, which will allow you to manage multiple applications under the same account.
Making Requests
All requests to our API are made with POST verbs. When making requests, arguments are passed via params. If you're using one of our plugins, the requests are handled for you automatically when you call the appropriate function.
Endpoints
Get Rates
Displays the available postage services and rates for a given package
Required fields
- key: API key
- secret: API secret
- to_name: Name of recipient
- to_street: Street address of recipient
- to_street2: The second line address of recipient
- to_city: City of recipient
- to_state: State of recipient
- to_zip: ZIP code of recipient
- to_country: Country of recipient
- to_phone: Phone number of recipient
- from_name: Name of sender
- from_street: Street address of sender
- from_street2: The second line address of sender
- from_city: City of sender
- from_state: State of sender
- from_zip: ZIP code of sender
- from_country: Country of sender
- from_phone: Phone number of sender
- package_type: List of available package types can be found here
- carrier: List of available carriers can be found here
- weight_oz: Ounces remainder of package weight (not full weight in ounces)
- weight_lbs = Pounds of package weight (integer - submit remainder as ounces in above parameter)
- height = Inches of package height
- width = Inches of package width
- depth = Inches of package depth/length
- delivery_confirmation: Signature Confirmation.
List of available: NO_SIGNATURE - No Signature Required. SIGNATURE - Signature Required. ADULT_SIGNATURE - Signature Required by Adult. DO_NOT_SAFE_DROP - Do Not Safe Drop(Canada Post only).
HTTP request
POST https://bitcoinpostage.info/api/get-rates
Create Purchase
Purchases a shipping label. Please note that this function uses your account's credit balance.
Required fields
- key: API key
- secret: API secret
- to_name: Name of recipient
- to_street: Street address of recipient
- to_city: City of recipient
- to_state: State of recipient
- to_zip: ZIP code of recipient
- to_country: Country of recipient
- to_phone: Phone number of recipient
- from_name: Name of sender
- from_street: Street address of sender
- from_city: City of sender
- from_state: State of sender
- from_zip: ZIP code of sender
- from_country: Country of sender
- from_phone: Phone number of sender
- package_type: List of available package types can be found here
- carrier: List of available carriers can be found here
- service: Service chosen from the Get Rates endpoint output
- weight_oz: Ounces remainder of package weight (not full weight in ounces)
- weight_lbs = Pounds of package weight (integer - submit remainder as ounces in above parameter)
- height = Inches of package height
- width = Inches of package width
- depth = Inches of package depth/length
- delivery_confirmation: Signature Confirmation.
List of available: NO_SIGNATURE - No Signature Required. SIGNATURE - Signature Required. ADULT_SIGNATURE - Signature Required by Adult. DO_NOT_SAFE_DROP - Do Not Safe Drop(Canada Post only).
HTTP request
POST https://bitcoinpostage.info/api/create-purchase
Create International Purchase
Purchases a shipping label. Please note that this function uses your account's credit balance.
Required fields
- key: API key
- secret: API secret
- to_name: Name of recipient
- to_street: Street address of recipient
- to_city: City of recipient
- to_state: State of recipient
- to_zip: ZIP code of recipient
- to_country: Country of recipient
- to_phone: Phone number of recipient
- from_name: Name of sender
- from_street: Street address of sender
- from_city: City of sender
- from_state: State of sender
- from_zip: ZIP code of sender
- from_country: Country of sender
- from_phone: Phone number of sender
- package_type: List of available package types can be found here
- carrier: List of available carriers can be found here
- service: Service chosen from the Get Rates endpoint output
- weight_oz: Ounces remainder of package weight (not full weight in ounces)
- weight_lbs: Pounds of package weight (integer - submit remainder as ounces in above parameter)
- height: Inches of package height
- width: Inches of package width
- depth: Inches of package depth/length
- type_contents: Type of Contents: Documents, Gift, Merchandise, Returned Goods, Sample
- signer: Signer / Name
- customs: Contains information relating to each product within the package. There can be several in one request.
Fields separated by :: Quantity, Description, Total Value($), Total Weight(oz), Country code of origin, Tariff Number
Example - 2::Books::100::20::US::49019900
HTTP request
POST https://bitcoinpostage.info/api/create-purchase
Retrieve Purchase
Retrieves a previously created shipping label.
Required fields
- key: API key
- secret: API secret
- id: Order ID returned by the Create Purchase endpoint
HTTP request
POST https://bitcoinpostage.info/api/retrieve-purchase
Charge Credits
Creates a pending transaction to charge your account. Once you complete the bitcoin transaction to the address specified, your account will automatically be charged. Please note that sending the wrong amount will result in failing to charge your account, and any given address is only usable for a single transaction.
Required fields
- key: API key
- secret: API secret
- amount: Amount in USD you wish to charge
HTTP request
POST https://bitcoinpostage.info/api/charge-credits
Get Credits
Retrieves your current credit balance.
Required fields
- key: API key
- secret: API secret
HTTP request
POST https://bitcoinpostage.info/api/get-credits
Orders List
Retrieves your orders list.
Required fields
- key: API key
- secret: API secret
HTTP request
POST https://bitcoinpostage.info/api/orders
Retrieve Purchase
Retrieves all shipments from your order.
Required fields
- key: API key
- secret: API secret
- order_id: Order ID
HTTP request
POST https://bitcoinpostage.info/api/retrieve-order
Register Tracking Number
When the tracking number is successfully registered and the package status changes, a notification will be sent to the webhook URL
Each tracking number costs 0.04 taking from your credits.
Required fields
- key: API key
- secret: API secret
- number: Tracking number
- webhook_url: Webhook URL
Optional fields
- tag: A tag you can note anything down with no more than 100 characters.
HTTP request
POST https://bitcoinpostage.info/api/register-track
Stop Tracking
Use this to stop the tracking of a tracking number.
Required fields
- key: API key
- secret: API secret
- number: Tracking number
HTTP request
POST https://bitcoinpostage.info/api/stop-track
Retrack a Stopped Tracking Number
Restart the automatic tracking for a tracking number that has beem stopped.
Required fields
- key: API key
- secret: API secret
- number: Tracking number
HTTP request
POST https://bitcoinpostage.info/api/retrack-shipment
Get USPS SCAN Form
Creating USPS SCAN Form for the order.
Required fields
- key: API key
- secret: API secret
- order_id: Order Number
HTTP request
POST https://bitcoinpostage.info/api/get-scanform
Create FedEx Account
After passing the verification process, you will be able to purchase FedEx labels
Required fields
- key: API key
- secret: API secret
- firstname: First Name
- lastname: Last Name
- street: Street Address
- city: City
- state: State
- zip: ZIP Code
- country: Country Code
HTTP request
POST https://bitcoinpostage.info/api/create-fedex-account