Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions official/docs/csharp/current/trackers/batch.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using EasyPost;
using Newtonsoft.Json;

namespace EasyPostExamples
{
public class Examples
{
public static async Task Main()
{
var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY"));

EasyPost.Parameters.Tracker.Batch parameters = new()
{
TrackingCodes = new List<string> { "EZ1000000001", "EZ1000000002" }
};

EasyPost.Models.API.TrackerCollection trackerCollection = await client.Tracker.RetrieveBatch(parameters);

Console.WriteLine(JsonConvert.SerializeObject(trackerCollection, Formatting.Indented));
}
}
}
9 changes: 9 additions & 0 deletions official/docs/curl/current/trackers/batch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
curl -X POST https://api.easypost.com/v2/trackers/batch \
-u "EASYPOST_API_KEY": \
-H 'Content-Type: application/json' \
-d '{
"tracking_codes": [
"EZ1000000001",
"EZ1000000002"
]
}'
19 changes: 19 additions & 0 deletions official/docs/golang/current/trackers/batch.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package example

import (
"fmt"

"github.com/EasyPost/easypost-go/v5"
)

func batch() {
client := easypost.New("EASYPOST_API_KEY")

trackers, _ := client.RetrieveTrackerBatch(
&easypost.ListTrackersOptions{
TrackingCodes: []string{"EZ1000000001", "EZ1000000002"},
},
)

fmt.Println(trackers)
}
21 changes: 21 additions & 0 deletions official/docs/java/current/trackers/batch.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package trackers;

import java.util.Arrays;
import java.util.HashMap;

import com.easypost.exception.EasyPostException;
import com.easypost.model.TrackerCollection;
import com.easypost.service.EasyPostClient;

public class Batch {
public static void main(String[] args) throws EasyPostException {
EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY");

HashMap<String, Object> params = new HashMap<String, Object>();
params.put("tracking_codes", Arrays.asList("EZ1000000001", "EZ1000000002"));

TrackerCollection trackers = client.tracker.retrieveBatch(params);

System.out.println(trackers);
}
}
11 changes: 11 additions & 0 deletions official/docs/node/current/trackers/batch.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const EasyPostClient = require('@easypost/api');

const client = new EasyPostClient('EASYPOST_API_KEY');

(async () => {
const trackers = await client.Tracker.retrieveBatch({
tracking_codes: ['EZ1000000001', 'EZ1000000002'],
});

console.log(trackers);
})();
9 changes: 9 additions & 0 deletions official/docs/php/current/trackers/batch.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

$client = new \EasyPost\EasyPostClient('EASYPOST_API_KEY');

$trackers = $client->tracker->retrieveBatch([
'tracking_codes' => ['EZ1000000001', 'EZ1000000002'],
]);

echo $trackers;
9 changes: 9 additions & 0 deletions official/docs/python/current/trackers/batch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import easypost

client = easypost.EasyPostClient("EASYPOST_API_KEY")

trackers = client.tracker.retrieve_batch(
tracking_codes=["EZ1000000001", "EZ1000000002"],
)

print(trackers)
3 changes: 3 additions & 0 deletions official/docs/responses/billing/create-referral-token.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"public_key": "pk_..."
}
94 changes: 71 additions & 23 deletions official/docs/responses/carrier-metadata/retrieve.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,119 +7,151 @@
{
"carrier": "usps",
"description": null,
"dimensions": ["6in x 4.5in x 0.016in"],
"dimensions": [
"6in x 4.5in x 0.016in"
],
"human_readable": null,
"max_weight": null,
"name": "Card"
},
{
"carrier": "usps",
"description": null,
"dimensions": ["11.5in x 6.125in x 0.25in"],
"dimensions": [
"11.5in x 6.125in x 0.25in"
],
"human_readable": null,
"max_weight": null,
"name": "Letter"
},
{
"carrier": "usps",
"description": null,
"dimensions": ["11.5in x 6.125in x 0.75in"],
"dimensions": [
"11.5in x 6.125in x 0.75in"
],
"human_readable": null,
"max_weight": null,
"name": "Flat"
},
{
"carrier": "usps",
"description": null,
"dimensions": ["12.5in x 9.5in"],
"dimensions": [
"12.5in x 9.5in"
],
"human_readable": null,
"max_weight": null,
"name": "FlatRateEnvelope"
},
{
"carrier": "usps",
"description": null,
"dimensions": ["15in x 9.5in"],
"dimensions": [
"15in x 9.5in"
],
"human_readable": null,
"max_weight": null,
"name": "FlatRateLegalEnvelope"
},
{
"carrier": "usps",
"description": null,
"dimensions": ["12.5in x 9.5in"],
"dimensions": [
"12.5in x 9.5in"
],
"human_readable": null,
"max_weight": null,
"name": "FlatRatePaddedEnvelope"
},
{
"carrier": "usps",
"description": null,
"dimensions": ["10in x 5in", "12.5in x 9.5in"],
"dimensions": [
"10in x 5in",
"12.5in x 9.5in"
],
"human_readable": null,
"max_weight": null,
"name": "FlatRateWindowEnvelope"
},
{
"carrier": "usps",
"description": null,
"dimensions": ["12.5in x 9.5in"],
"dimensions": [
"12.5in x 9.5in"
],
"human_readable": null,
"max_weight": null,
"name": "FlatRateCardboardEnvelope"
},
{
"carrier": "usps",
"description": null,
"dimensions": ["10in x 6in"],
"dimensions": [
"10in x 6in"
],
"human_readable": null,
"max_weight": null,
"name": "SmallFlatRateEnvelope"
},
{
"carrier": "usps",
"description": null,
"dimensions": ["Varies based on service level"],
"dimensions": [
"Varies based on service level"
],
"human_readable": null,
"max_weight": null,
"name": "Parcel"
},
{
"carrier": "usps",
"description": null,
"dimensions": ["Varies based on service level"],
"dimensions": [
"Varies based on service level"
],
"human_readable": null,
"max_weight": 320.0,
"name": "SoftPack"
},
{
"carrier": "usps",
"description": null,
"dimensions": ["8.6875in x 5.4375in x 1.75in"],
"dimensions": [
"8.6875in x 5.4375in x 1.75in"
],
"human_readable": null,
"max_weight": null,
"name": "SmallFlatRateBox"
},
{
"carrier": "usps",
"description": null,
"dimensions": ["11.25in x 8.75in x 6in", "14.125in x 12in x 3.5in"],
"dimensions": [
"11.25in x 8.75in x 6in",
"14.125in x 12in x 3.5in"
],
"human_readable": null,
"max_weight": null,
"name": "MediumFlatRateBox"
},
{
"carrier": "usps",
"description": null,
"dimensions": ["12.25in x 12in x 6in"],
"dimensions": [
"12.25in x 12in x 6in"
],
"human_readable": null,
"max_weight": null,
"name": "LargeFlatRateBox"
},
{
"carrier": "usps",
"description": null,
"dimensions": ["12.25in x 12.25in x 6in"],
"dimensions": [
"12.25in x 12.25in x 6in"
],
"human_readable": null,
"max_weight": null,
"name": "LargeFlatRateBoxAPOFPO"
Expand Down Expand Up @@ -180,47 +212,59 @@
{
"carrier": "usps",
"description": "1-3 business days",
"dimensions": ["Combined Length and Girth < 108in"],
"dimensions": [
"Combined Length and Girth < 108in"
],
"human_readable": "Priority Mail\u00ae",
"max_weight": 1120.0,
"name": "Priority"
},
{
"carrier": "usps",
"description": "1-2 days",
"dimensions": ["Combined Length and Girth < 108in"],
"dimensions": [
"Combined Length and Girth < 108in"
],
"human_readable": "Priority Mail Express\u00ae",
"max_weight": 1120.0,
"name": "Express"
},
{
"carrier": "usps",
"description": "2-5 days",
"dimensions": ["Combined Length and Girth < 130in"],
"dimensions": [
"Combined Length and Girth < 130in"
],
"human_readable": "USPS Ground Advantage\u00ae",
"max_weight": 70.0,
"name": "GroundAdvantage"
},
{
"carrier": "usps",
"description": "2-8 business days",
"dimensions": ["Combined Length and Girth < 108in"],
"dimensions": [
"Combined Length and Girth < 108in"
],
"human_readable": "Library Mail\u00ae",
"max_weight": 1120.0,
"name": "LibraryMail"
},
{
"carrier": "usps",
"description": "2-8 business days",
"dimensions": ["Combined Length and Girth < 108in"],
"dimensions": [
"Combined Length and Girth < 108in"
],
"human_readable": "Media Mail\u00ae",
"max_weight": 1120.0,
"name": "MediaMail"
},
{
"carrier": "usps",
"description": null,
"dimensions": ["Must be rectangular, otherwise an additional charge may apply."],
"dimensions": [
"Must be rectangular, otherwise an additional charge may apply."
],
"human_readable": "First-Class Mail International\u00ae",
"max_weight": 15.994,
"name": "FirstClassMailInternational"
Expand All @@ -240,15 +284,19 @@
{
"carrier": "usps",
"description": "6-10 business days",
"dimensions": ["Combined Length and Girth < 108in"],
"dimensions": [
"Combined Length and Girth < 108in"
],
"human_readable": "Priority Mail International\u00ae",
"max_weight": 1120.0,
"name": "PriorityMailInternational"
},
{
"carrier": "usps",
"description": "3-5 business days",
"dimensions": ["Combined Length and Girth < 108in"],
"dimensions": [
"Combined Length and Girth < 108in"
],
"human_readable": "Priority Mail Express International\u00ae",
"max_weight": 1120.0,
"name": "ExpressMailInternational"
Expand Down
4 changes: 3 additions & 1 deletion official/docs/responses/insurance/refund.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@
"charged": true,
"refunded": false
},
"messages": ["Insurance was cancelled by the user."],
"messages": [
"Insurance was cancelled by the user."
],
"created_at": "2025-05-12T19:40:17Z",
"updated_at": "2025-05-12T19:40:18Z"
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"refunded_amount": 2000,
"payment_log_id": "paylog_...",
"refunded_payment_logs": ["paylog...", "paylog..."],
"refunded_payment_logs": [
"paylog...",
"paylog..."
],
"errors": []
}
Loading
Loading