Skip to main content
POST
/
v1
/
orders
Create order
curl --request POST \
  --url https://api.human.prod.artistree.io/v1/orders \
  --header 'Content-Type: application/json' \
  --data '
{
  "asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "asset_name": "<string>",
  "asset_last_modified_timestamp": 123,
  "organization_id": "<string>",
  "state": "Start",
  "project_id": "Personal Certificates",
  "ordered_by": "",
  "ordered_by_email": "",
  "order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "order_title": "",
  "tags": [
    "<string>"
  ]
}
'
{
  "pre_signed_url": "<string>",
  "order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Order Creation Steps

1

Start Order Creation

  • Call the endpoint with the required fields and the state set to Start
  • The response will contain:
    • A pre_signed_url for uploading the asset
    • An order_id for committing the order
2

Upload Asset

  • Upload the asset with PUT request using the pre_signed_url
  • Example S3 upload request:
    cURL
    curl --location 'S3_PRE_SIGNED_URL' \
    --request PUT
    --upload-file 'PATH_TO_FILE'
    
  • Notice the lack of Content-Type header
3

Commit the Order

  • Finalize the order creation by calling the endpoint again with:
    • The state set to Commit
    • The rest of the optional fields
    • The order_id from step
      1

Body

application/json

The order creation request

The order creation request

asset_id
string<uuid>
required

A unique UUID identifier for the asset.

asset_name
string
required

The filename of the asset, make sure it matches the actual file name you intend to upload, especially whether it has an extension or not.

asset_last_modified_timestamp
integer
required

A Unix timestamp of the last time the asset was modified.

organization_id
string
required
state
enum<string>
required
Available options:
Start,
Commit
project_id
string | null
default:Personal Certificates

The project id the order is associated with. If not provided, it will be set to 'Personal Certificates', meaning the order is not associated with any project but uploaded to App Client's Personal Certificates.

ordered_by
string | null
default:""

The entity that is ordering the certificate, can be the same as the username or a anything else, ex. the artist name.

ordered_by_email
string | null
default:""

The email of the entity that is ordering the certificate, can be the same as the username or a anything else, ex. the artist email.

order_id
string<uuid> | null
order_title
string | null
default:""
tags
string[]

Tags to be added to the order, can be used for filtering and searching.

Response

The Start order response

pre_signed_url
string
required
order_id
string<uuid>
required