Library

Introduction

Through the endpoints included in the Library section, you will be able to:

  • Retrieve all the available images from the library

  • Retrieve an image from the library

  • Add an image to the library

Endpoints

Show library

get

This API endpoint retrieves a list of all images from your library

Authorizations
Responses
200
OK
application/json
get
GET /api/v1/library HTTP/1.1
Host: api.merchone.com
Authorization: Basic username:password
Accept: */*
{
  "data": [
    {
      "image_id": "APO12345678",
      "file_name": "image-1000x1000",
      "width": 1000,
      "height": 1000,
      "size": "10",
      "image_url": "https://example.com/images/image.png"
    }
  ]
}

Show an image from the library

get

This API endpoint retrieves an images from your library

Authorizations
Path parameters
imagestringRequired

The ID of the image.

Responses
200
OK
application/json
get
GET /api/v1/library/{image} HTTP/1.1
Host: api.merchone.com
Authorization: Basic username:password
Accept: */*
{
  "data": {
    "image_id": "APO12345678",
    "file_name": "image name",
    "width": 1000,
    "height": 1000,
    "size": "10",
    "image_url": "https://example.com/images/image.png"
  }
}

Post a new image to the library

post

This API endpoint allows you to upload a new image to your library

Authorizations
Body
file_namestringRequired
urlstringRequired
Responses
200
OK
application/json
post
POST /api/v1/library HTTP/1.1
Host: api.merchone.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 71

{
  "file_name": "image name",
  "url": "https://example.com/images/image.png"
}
{
  "data": {
    "image_id": "APO12345678",
    "file_name": "image name",
    "upload_date": "2025-01-01 00:00:00"
  }
}

Last updated