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.
{
"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.
| Field | document_urls, an array of { name, url } objects |
|---|---|
| Type | name is a string. url is a URL (including http or https), ASCII characters only, and RFC 3986 compliant |
| Limits | name 1-191 characters. url has no length limit |
| Repeated field | Yes |
| Variant inherits | No. A variant only shows the resources sent with it |
| Per language | Yes. 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
httporhttpsand 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.
- List URLs and Show URL
- Create URL and Update URL
- Archive URL, List URL archives and Restore URL