UniLink API: Products Endpoint (Manage Your Store Catalog via API)

The /products endpoint gives you full programmatic control over your UniLink store catalog — create, read, update, and delete products without touching the dashboard.

  • Use GET /products to list your catalog and POST /products to create new items programmatically.
  • Products support three types: digital, physical, and subscription, each with its own required fields.
  • Bulk sync tools and inventory management systems can automate stock updates via PUT /products/{id}.

The UniLink Products API endpoint is the backbone of any store automation workflow — from syncing a Shopify catalog into UniLink to building a custom inventory management tool that updates stock levels in real time. Rather than manually managing each product through the dashboard, your application can create hundreds of products in a single script, keep prices in sync with your source-of-truth system, and retire discontinued items automatically. Every operation uses standard HTTP verbs against the https://unilink.us/api/v1/products base path.

What the Products Endpoint Does

The Products endpoint exposes full CRUD operations for the items in your UniLink store. A GET request to /products returns a paginated list of all products on your account — including their current price, stock level, status, and type. You can filter the list by type, status, or a search query using URL parameters. Each product in the list response contains the same fields as a single-product fetch, making it easy to process the catalog without follow-up requests.

Product objects contain the fields your storefront needs to display and sell items. The name and description fields drive your product listing copy. The price field is an integer in cents (for example, 2999 for $29.99) to avoid floating-point rounding issues. The type field accepts digital, physical, or subscription — this value determines which checkout flow UniLink uses and which fulfilment options are available. The stock field is an integer representing units available; set it to null to mark a product as unlimited. The images field is an array of CDN URLs for product photos.

Deleting a product via DELETE /products/{id} removes it from your storefront immediately and makes it unavailable for new purchases. Existing orders referencing the deleted product are not affected — order records retain a snapshot of the product details at the time of purchase. If you want to hide a product without deleting it permanently, set its status to draft via a PUT request instead; draft products remain queryable via the API but do not appear on the public storefront.

How to Get Started

  1. Generate an API key with write scope from Settings → API in your UniLink dashboard at app.unilink.us. Copy the key immediately — it is shown only once.
  2. Test the connection with a list request: curl -H "Authorization: Bearer YOUR_KEY" https://unilink.us/api/v1/products. A 200 response with a JSON array confirms authentication is working.
  3. Review the product object shape by fetching a single existing product: GET /products/{id}. Note the field names and value formats — especially that price is in cents, not dollars.
  4. Create your first product via API: send a POST request to /products with a JSON body containing at minimum name, price, and type. A successful response returns the full product object including the assigned id.
  5. Verify the product appears on your storefront by visiting your UniLink page or fetching the product again with GET /products/{id} using the ID from the creation response.

How to Use the Products Endpoint

  1. List products: GET /products?type=digital&status=published&page=1&per_page=50 — use the type, status, and pagination parameters to page through your catalog efficiently.
  2. Fetch a single product: GET /products/{id} returns the full product object. Use this before updating a product to confirm the current field values.
  3. Create a product: POST /products with a JSON body. Required fields: name (string), price (integer, cents), type (digital/physical/subscription). Optional: description, stock, images, status (defaults to published).
  4. Update a product: PUT /products/{id} accepts a partial JSON body — only send the fields you want to change. For example, to update stock only: {"stock": 42}.
  5. Delete a product: DELETE /products/{id} requires admin scope. The response is 204 No Content on success. Consider setting status: "draft" via PUT instead if you may need to restore the product later.

Key Settings

SettingWhat It DoesRecommended
typeDetermines checkout flow and fulfilment options (digital/physical/subscription)Set correctly at creation — changing type later may affect existing checkout links
priceSale price in cents as an integer (e.g., 1999 = $19.99)Always store and send as cents to avoid rounding errors
stockInteger for limited inventory; null for unlimitedUse null for digital products; use integers for physical goods with real inventory
statusControls storefront visibility: published, draft, or archivedUse draft to hide without deleting; use archived for discontinued items
imagesArray of CDN image URLs displayed on the product listingUpload images to cdn.unilink.us first and reference those URLs here
Tip: When syncing a large external catalog, use a batch loop that sends POST /products requests with a 100ms delay between them to stay comfortably within the rate limit. Include your external system's product ID in the description or a custom metadata field so you can map UniLink product IDs back to your source system for future updates.

Get the Most Out Of the Products Endpoint

Build your catalog sync as a two-pass operation: the first pass creates new products and stores the resulting UniLink IDs in your database alongside your source IDs. The second pass — which runs on a schedule — compares prices and stock levels between your source system and UniLink, then calls PUT /products/{id} only for products that have actually changed. This delta-sync approach keeps your API call count low and avoids unnecessary writes.

Use the status field as a soft-delete layer. When a product is discontinued in your source system, set its UniLink counterpart to archived rather than calling DELETE. Archived products are invisible to shoppers but fully recoverable if needed. True deletion should be reserved for test data and duplicates — once deleted, a product's ID is gone and any external references to it will return 404.

For subscription products, the price field represents the recurring charge per billing cycle. The billing interval (monthly, annual) is configured on the product in the dashboard, not through the API at this time. Create the product via API with the correct price, then configure the interval in the dashboard before publishing. Future API versions will expose interval as a writable field.

When uploading product images, upload to your CDN first and pass the resulting URL in the images array. UniLink does not accept binary file uploads on the products endpoint — image hosting must be handled separately. The cdn.unilink.us upload endpoint or any public image host works. Aim for images at 800×800 pixels or larger in JPEG or WebP format for best storefront display quality.

Troubleshooting

ProblemCauseFix
422 Unprocessable Entity on POSTMissing required field or invalid value format (e.g., price as a decimal)Ensure name, price (integer cents), and type are present and correctly typed
Product visible via API but not on storefrontProduct status is draft rather than publishedSend PUT /products/{id} with {"status": "published"}
DELETE returns 403API key has write scope, not admin scopeGenerate a new key with admin scope or use PUT to set status to archived instead
Stock not decrementing after purchaseStock management is handled by the checkout system, not the API directlyThis is expected behaviour — use GET to read current stock; do not attempt to sync stock counts against concurrent checkout traffic without a locking strategy
  • Full CRUD operations allow complete catalog management without the dashboard
  • Partial updates via PUT mean you only need to send changed fields, reducing payload size
  • Three product types cover digital downloads, physical goods, and subscriptions in one endpoint
  • Draft and archived statuses enable non-destructive visibility control
  • Image uploads must be handled separately — the products endpoint accepts URLs, not binary files
  • Subscription billing intervals cannot yet be configured via API — requires a dashboard step
  • DELETE requires admin scope, which is a broader permission than many automations should hold
What is the maximum number of products I can create via API?

Product limits depend on your UniLink plan. Pro accounts support up to 500 active products; Business accounts have no hard cap. The API returns a 403 with a plan limit message if you exceed your tier's maximum.

Can I create a product with a zero price (free product)?

Yes — set price to 0 to create a free product. Customers can add it to cart and complete checkout without entering payment details. This is useful for free digital downloads or lead magnets.

How do I add multiple images to a product?

Pass an array of image URLs in the images field: "images": ["https://cdn.example.com/a.jpg", "https://cdn.example.com/b.jpg"]. The first URL in the array is used as the primary display image on the storefront.

Does updating a product via PUT affect existing orders?

No. Order records store a snapshot of the product details at the time of purchase. Changing the price or name of a product does not retroactively modify completed orders.

How do I filter products by type when listing?

Use the type query parameter: GET /products?type=digital. Accepted values are digital, physical, and subscription. You can also filter by status using ?status=published.

  • The base URL for all product operations is https://unilink.us/api/v1/products — authenticate with a Bearer token on every request.
  • The price field is always an integer in cents — send 2999, not 29.99.
  • Use status: "draft" or "archived" instead of DELETE when you might need to restore a product later.
  • Partial PUT updates let you change only the fields you need without resending the full product object.
  • Build a delta-sync that compares your source system against UniLink and only calls the API when values differ to stay within rate limits.

Start managing your store catalog via API — generate a write-scope key at app.unilink.us under Settings → API and make your first GET /products request today.