Core APIs
Zipcodes API
Add
3min
add zipcode post post /zipcodes to add zipcodes to your account you should make an http post request to the add zipcodes endpoint, specifying an array of objects containing a zipcode and domain property describing the zipcodes you'd like to add and the domain to use them on zipcode licensing to view how many zipcodes you can add to your account you can use the account api https //docs trajectdata com/bigboxapi/account api zipcodes can also be added visually via the dashboard https //app bigboxapi com/zipcodes for more information about using zip & postal codes with bigbox api please see the zipcodes overview https //docs trajectdata com/bigboxapi/zipcodes api/overview zipcode status when a zipcode is first added to your account it will report its status as status=preparing zipcodes take around 2 minutes from the point they are added to your account to them being ready to service requests (during which time any requests specifing the zipcode in their customer zipcode parameter will fail) when the zipcode is ready it will report as status=available and can then be used in a requests customer zipcode parameter for more information see the zipcode overview https //docs trajectdata com/bigboxapi/zipcode api/overview $ curl "https //api bigboxapi com/zipcodes?api key=demo" \\ \ data '\[ { "zipcode" "30339", "domain" "homedepot com" } ]'const axios = require('axios'); const body = \[ { 'zipcode' '30339', 'domain' 'homedepot com' } ]; axios post('https //api bigboxapi com/zipcodes?api key=demo', body) then(response => { const apiresponse = response data; console log('zipcodes added ' + json stringify(apiresponse, 0, 2)); }) catch(error => { console log(error); });import requests import json body = \[ { 'zipcode' '30339', 'domain' 'homedepot com' } ]; api result = requests post('https //api bigboxapi com/zipcodes?api key=demo', json=body) api response = api result json() print "zipcodes added ", json dumps(api response)\<?php $body = array( array( 'zipcode' => '30339', 'domain' => 'homedepot com' ) ); $ch = curl init('https //api bigboxapi com/zipcodes?api key=demo'); curl setopt($ch, curlopt returntransfer, true); curl setopt($ch, curlopt followlocation, true); \# the following options are required if you're using an outdated openssl version \# more details https //www openssl org/blog/blog/2021/09/13/letsencryptrootcertexpire/ curl setopt($ch, curlopt ssl verifyhost, false); curl setopt($ch, curlopt ssl verifypeer, false); curl setopt($ch, curlopt timeout, 180); curl setopt($ch, curlopt customrequest, "post"); curl setopt($ch, curlopt postfields, json encode($body)); $json = curl exec($ch); curl close($ch); $api result = json decode($json, true); print r($api result); echo "zipcodes added", php eol; ?> an example of a successful response to the add zipcodes api is shown below { "request info" { "success" true, "message" "2 zipcodes added" } } next steps zipcodes overview https //docs trajectdata com/bigboxapi/zipcodes api/overview deleting a zipcode via the zipcodes api https //docs trajectdata com/bigboxapi/zipcodes api/delete listing all zipcodes via the zipcodes api https //docs trajectdata com/bigboxapi/zipcodes api/list