Skip to main content

Overview

A product is anything you sell through Hyparrow — physical goods that ship, or digital items delivered by file. Each product carries a name, description, price, currency, and an optional category and SKU. Products can be enriched with three building blocks:
  • Variants — sellable versions of the same product (e.g. Small / Medium / Large), each with its own price, SKU, stock, tax, and discount.
  • Stock — the quantity available, tracked at the product level and, when you use variants, per variant.
  • Delivery options — the shipping or fulfilment choices a buyer sees at checkout (free, standard, fast, premium), each with a price and an estimated delivery window.
All product endpoints live under the base URL and are authenticated with your API key pair.
Base URL: https://api.hyparrow.cloud/api/v1Every request must include both auth headers:
To test against the sandbox, use https://sandbox.hyparrow.cloud/api/v1 with your pk_test_ / sk_test_ keys. No real money or stock is affected.
Money fields in product payloads are expressed in naira as decimal strings (for example "4500.00"). Where the wider Hyparrow API settles money in transactions, amounts are in kobo (1 naira = 100 kobo). Keep this distinction in mind when reconciling product prices against payment webhooks.

Create a product

1

Build the payload

Decide whether the product is physical or digital, set a positive price, and optionally attach variants inline. A digital product typically carries a fileUrl.
2

POST to /products/

Send the request with your auth headers. A successful call returns 201 Created with the full product record, including its generated id and non-expiring payment slug.
3

Enrich it

Add images, delivery options, or extra variants in follow-up calls.

Request

Response

type must be physical or digital, price must be greater than 0, and if you send stock it must be greater than 0. Each inline variant must have a non-empty name and a positive price, otherwise the request fails with 400 and a message such as variants[1].price must be greater than 0.

List products

GET /products/ returns the authenticated client’s products with pagination and filters.

Search products

GET /products/search performs a keyword and price-range search across your catalogue.

Get a single product

GET /products/{productId} returns the full product, including variants and delivery options.
A missing or malformed ID returns 404 / 400 respectively.

Update a product

PUT /products/{productId} updates any subset of fields. Only the fields you send are changed.
Stock can be supplied as either stock or the alias stockQuantity. If both are present, stock wins.

Delete a product

DELETE /products/{productId} removes the product.

Calculate price

GET /products/{productId}/price computes the total for a given quantity and optional variant, applying any tax and discount.

Variants

Variants let one product carry multiple sellable versions, each with its own price, SKU, stock, tax, and discount.
Adding a variant returns 201 with the created record:

Stock

Stock is managed separately from price so you can adjust inventory without touching the rest of the product.
  • Product stockPATCH /products/{productId}/stock
  • Variant stockPATCH /products/{productId}/variants/{variantId}/stock
Both accept the same body:

Delivery options

Delivery options are the fulfilment choices presented to buyers. Each option has a type (free, standard, fast, or premium), a label, a price, an estimatedDays window, and an isActive flag.
Adding an option returns 201:
An invalid delivery type returns 400 with invalid delivery type, must be free/standard/fast/premium.