Skip to main content

Tested partner API examples

Keep SNIFF_PARTNER_KEY in your server environment. Each sample states prerequisites. These requests were tested against local route handlers with synthetic data; production deployment and your business access are separate acceptance checks.

getWhoami​

curl

# For a terminal session, paste at the silent prompt: read -rs SNIFF_PARTNER_KEY
curl --silent --show-error --fail-with-body --request GET --header "Authorization: Bearer ${SNIFF_PARTNER_KEY:?Set SNIFF_PARTNER_KEY in your server environment}" --write-out '
%{http_code}' 'https://www.sniffopotamus.com/api/partner/v1/whoami'

getCapabilities​

curl

# For a terminal session, paste at the silent prompt: read -rs SNIFF_PARTNER_KEY
curl --silent --show-error --fail-with-body --request GET --header "Authorization: Bearer ${SNIFF_PARTNER_KEY:?Set SNIFF_PARTNER_KEY in your server environment}" --write-out '
%{http_code}' 'https://www.sniffopotamus.com/api/partner/v1/capabilities'

getCard​

curl

# For a terminal session, paste at the silent prompt: read -rs SNIFF_PARTNER_KEY
curl --silent --show-error --fail-with-body --request GET --header "Authorization: Bearer ${SNIFF_PARTNER_KEY:?Set SNIFF_PARTNER_KEY in your server environment}" --write-out '
%{http_code}' 'https://www.sniffopotamus.com/api/partner/v1/fragrances/03c188b7-74aa-469d-ae40-caa8c45673b7/card'

curl PNG

# Save a square look named Square in your workspace before running this example.
# For a terminal session, paste at the silent prompt: read -rs SNIFF_PARTNER_KEY
curl --silent --show-error --fail-with-body --request GET --header "Authorization: Bearer ${SNIFF_PARTNER_KEY:?Set SNIFF_PARTNER_KEY in your server environment}" --write-out '
%{http_code}' 'https://www.sniffopotamus.com/api/partner/v1/fragrances/03c188b7-74aa-469d-ae40-caa8c45673b7/card?look=Square&format=png'

getProductCard​

curl

# Approve product-1 in your business account before running this example.
# For a terminal session, paste at the silent prompt: read -rs SNIFF_PARTNER_KEY
curl --silent --show-error --fail-with-body --request GET --header "Authorization: Bearer ${SNIFF_PARTNER_KEY:?Set SNIFF_PARTNER_KEY in your server environment}" --write-out '
%{http_code}' 'https://www.sniffopotamus.com/api/partner/v1/products/product-1/card'

curl

# Approve product-1 in your business account before running this example.
# For a terminal session, paste at the silent prompt: read -rs SNIFF_PARTNER_KEY
curl --silent --show-error --fail-with-body --request GET --header "Authorization: Bearer ${SNIFF_PARTNER_KEY:?Set SNIFF_PARTNER_KEY in your server environment}" --write-out '
%{http_code}' 'https://www.sniffopotamus.com/api/partner/v1/products/product-1/card?format=html'

searchPerfumes​

curl

# For a terminal session, paste at the silent prompt: read -rs SNIFF_PARTNER_KEY
curl --silent --show-error --fail-with-body --request GET --header "Authorization: Bearer ${SNIFF_PARTNER_KEY:?Set SNIFF_PARTNER_KEY in your server environment}" --write-out '
%{http_code}' 'https://www.sniffopotamus.com/api/partner/v1/search?q=casafutura+xerjoff'

matchProducts​

curl

# For a terminal session, paste at the silent prompt: read -rs SNIFF_PARTNER_KEY
curl --silent --show-error --fail-with-body --request POST --header "Authorization: Bearer ${SNIFF_PARTNER_KEY:?Set SNIFF_PARTNER_KEY in your server environment}" --header 'Content-Type: application/json' --data '{"rows":[{"ref":"product-1","brand":"Xerjoff","name":"Casafutura","strength":"Eau de Parfum"},{"ref":"product-2","brand":"Dior","name":"Sauvage"},{"ref":"product-3","name":"A perfume that is not recorded"}]}' --write-out '
%{http_code}' 'https://www.sniffopotamus.com/api/partner/v1/match'

listLooks​

curl

# For a terminal session, paste at the silent prompt: read -rs SNIFF_PARTNER_KEY
curl --silent --show-error --fail-with-body --request GET --header "Authorization: Bearer ${SNIFF_PARTNER_KEY:?Set SNIFF_PARTNER_KEY in your server environment}" --write-out '
%{http_code}' 'https://www.sniffopotamus.com/api/partner/v1/looks'
Back to SniffopotamusReturn to the app