Build it yourself

The whole integration in order: keys, listing fields, settings, when to call each tool, testing and going live.

You do not need a coding agent to integrate PCIFIC. Every tool is a web address your server calls with a key in the Authorization header. This page is the whole path in order. Each tool has its own page with its fields, errors and examples.

The steps, in order

A hand integration, start to finish
  1. Make a test keyOn the API keys page, with the permissions for the tools you will use. Store it on your server as PCIFIC_TEST_KEY. Check it with GET /api/v1/key.
  2. Upload your listing fieldsOne JSON Schema file per category, uploaded to the working copy and then published as a numbered version. Orbit and Safeguard read the newest version. The test key needs the listing-fields permission.
  3. Set the shared and tool settingsYour shop name, language, voice and AI notice, and each tool's own settings. The test key needs the settings permission.
  4. Add documents, if you use Ask PCIFICPolicy and help pages Ask PCIFIC answers from. The test key needs the documents permission.
  5. Call each tool where its answer changes what a person seesFrom your server only. Handle the errors in its table.
  6. Test with the test keyTry one listing you think is solid and one you think is weak. Every call shows on the Logs page with its timing and any error.
  7. Go livePCIFIC approves your account before you can make keys. Approved company email domains and accepted team invitations skip the wait. Account approval is the only approval from PCIFIC. To go live, choose Live key on the API keys page and press Activate live key; live calls spend credits bought from PCIFIC. Staff can suspend and restore live-key access (LIVE_KEYS_OFF). Put the key in your production server's settings. If the page says live keys are off, contact PCIFIC support before using it. Changing settings and listing fields stays a dashboard or test key job.

Keys and permissions

Build and test with a test key: it runs the real tools and spends no credits. A live key is for production and spends credits. Choose Live key and press Activate live key on the API keys page. A live key can read settings and listing fields but never change them, so a leaked production key cannot change how your account is set up. The full list of permissions is on the API keys and permissions page.

When to call each tool

Call a tool at the moment its answer changes what the person sees or does, and no more often.

When to call each tool
ToolCall it whenDon't call it when
Safeguard listing checkOnce, when the seller presses Publish, to review the listing before it goes live. Once when a buyer asks for a check, if you offer that. A review takes a few seconds to a minute, so start it and read it back until it is done.On every edit or page load, or again for a listing that has not changed since the last result. Reuse the last result until the listing changes.
Orbit listing generationWhen a seller asks for a draft from their notes and photos. If Orbit asks the seller questions, show them all together and send every answer in one request.On every keystroke, or to fill in a listing that is already complete.
Ask PCIFICWhen a buyer or visitor types a question that your documents could answer.To prefill a chat box, on page load, or for a question your page already answers in fixed text.
PCIFIC PixelTraceWhen a seller takes photos in the managed camera, and before publishing to check them.On every page load, or for listings that have no photos.
  • Live keys spend credits when a tool does its work. Test keys spend no credits and share a daily AI request cap for each shop. PCIFIC's ceiling is 200 per shop per UTC day by default; you can set a lower cap for all shops. GET /api/v1/usage shows your balance and the test cap. A request with a bad key is not charged.
  • Every tool takes up to 12 photos in one request.

When PCIFIC is down

Read code and tryThis before handling a 5xx. A 5xx is on PCIFIC's side: keep building with saved responses, retry after the Retry-After header when there is one, then back off (2, 4 then 8 seconds) and stop after three tries, sending the same Idempotency-Key each time where the call takes one. BYO_PROVIDER_ERROR means your own model provider (Bring Your Own) did not answer: check with that provider that the key, its credits and the model work, and contact PCIFIC support to change them. Never retry a 4xx other than 429 without changing the request. A PCIFIC outage never has to stop a seller saving or publishing.

Money

PCIFIC writes a price as a whole number in the smallest unit of its currency (pence or cents), with the currency code beside it, the way payment systems do. In your listing fields a price field is marked "x-pcific-money": true and is an object like {"amount": 5500, "currency": "GBP"}, which is £55. Send the amount as a number without a decimal point or exponent, not as text: decimal and text amounts are refused. For example, 4500 pence is £45. Your business has one currency, the currency setting in the Orbit settings (GBP unless you change it), and prices are never converted from another currency.

Errors, limits and retries

Every error is a JSON body with error, code, tryThis and sometimes problems. Branch on code, and follow tryThis. The shared errors, the limits and the rules for sending a request again safely are on the Errors, limits and retries page.

Start a listing that is safe to send again
curl -X POST https://business.pcific.ai/api/v1/listings \
  -H "Authorization: Bearer $PCIFIC_TEST_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 4f1c2b9e-7d3a-4c55-9a51-0e6b2f8d1c47" \
  -d '{"notes":"iPhone 13 128GB, unlocked, good condition"}'

Testing your integration

  • Build and test with the test key. It spends no credits. Test keys share an AI request cap for each shop: PCIFIC's ceiling is 200 per shop per UTC day by default, or your lower saved cap. You will see 429 TEST_DAILY_CAP_REACHED when that shop's allowance is used up; wait until midnight UTC or use a live key.
  • In your own automated tests, answer PCIFIC calls with recorded responses, so your tests never depend on PCIFIC and never use up the cap.
  • Look at the Logs page after each try. It shows every request your keys made, with its status and error.
  • The Credits page shows your balance, what each use costs and what used your credits. The Usage page shows your spending limits and the failed requests.

Machine-readable description

https://business.pcific.ai/openapi.json describes every address the API answers, in OpenAPI 3.1 (a standard file format for describing web APIs). Each address names the test key permission it needs, its errors, the 429 RATE_LIMITED answer with its Retry-After header, and the Idempotency-Key header where the call takes one. Import it into Postman or Insomnia, or generate a typed client from it.

Addresses by tool

  • Ask PCIFIC: POST /api/v1/ask-pcific. Guide: https://business.pcific.ai/docs/ask-pcific.txt
  • Safeguard listing check: POST /api/v1/safeguard/reviews. Guide: https://business.pcific.ai/docs/safeguard.txt
  • Orbit listing generation: POST /api/v1/listings. Guide: https://business.pcific.ai/docs/listing-generation.txt
  • PCIFIC PixelTrace: POST /api/v1/pixel-trace/captures. Guide: https://business.pcific.ai/docs/pixel-trace.txt

Words used on this page

  • JSON Schema: a standard way to describe what a piece of JSON data looks like.
  • Working copy: the set of listing field files you have uploaded but not yet published.
  • Idempotency-Key: a unique value you choose for each piece of work, so a repeated request is not done twice.
  • Minor units: the smallest unit of a currency, such as pence or cents.