Skip to main content
Skip to main content

Resources

Extended information on product and variant documents.

Overview

Attach datasheets, safety documents and other supporting files to a product with the document_urls field. These resources appear to potential buyers, in order equal to their position in the array.

Unlike images, each entry is an object rather than a bare URL: a resource needs both a name, which is the label the buyer sees, and a url.

JSON
{
"document_urls": [
{ "name": "Safety data sheet", "url": "https://www.example.com/docs/sds-13411864.pdf" },
{ "name": "User manual", "url": "https://www.example.com/docs/manual-13411864.pdf" }
]
}

When to use

Optional for each product and variant

Format

Follow these formatting guidelines to make sure that Axiom understands the data that you're submitting.

Fielddocument_urls, an array of { name, url } objects
Typename is a string. url is a URL (including http or https), ASCII characters only, and RFC 3986 compliant
Limitsname 1-191 characters. url has no length limit
Repeated fieldYes
Variant inheritsNo. A variant only shows the resources sent with it
Per languageYes. Resources are held per language, so each translation can carry its own documents

Note

Both name and url are required on every entry — an object with only a url fails validation. The file format is not checked, so make sure the URL points at something a buyer can open.

Guidelines

Follow these guidelines to make sure that your resource URL is formatted so that we can understand it.

Minimum requirements

These are the requirements that you'll need to meet to show your product. If you don't follow these requirements, we could reject your product.

  • Use a URL that points to a resource in a supported file format.
  • Start with http or https and comply with RFC 3986. For example: http://www.example.com/document1.pdf.
  • Replace any symbols or spaces with URL encoded entities. For example, if your URL contains an ampersand ( & ), then replace it with %26. If your URL contains a comma ( , ), then replace it with %2C.
  • Make sure that your URL can be crawled by Axiom. Make sure authentication is not required to view the resource.

Best practices

These best practices can help you go beyond the basic requirements to optimise your product data for performance.

  • Use a stable URL. The URL that you include shouldn't change unless your resource moves or is replaced. For example, don't use URLs with timestamps or parts that could change every time you submit your product data.

Managing resources through the API

Resources and images are both stored as product URLs, distinguished by their type (document or image). Sending document_urls in the product payload replaces the resources held against that product or variant. To manage them one at a time, use the URL endpoints in the API reference — documents also accept a language_code, which records the language the document is written in.