merchOne Documentation
  • Overview
  • REST API
  • API reference
    • API Beta
      • Catalog
      • Orders
      • Shipping
    • API V1
      • Blueprints
      • Orders
      • Library
      • Products
      • Shipping rates
  • Webhooks
  • Print files
Powered by GitBook
On this page
  1. API reference
  2. API V1

Library

PreviousOrdersNextProducts

Last updated 1 month ago

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
401
Unauthorized
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
401
Unauthorized
404
Not found.
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"
  }
}
  • Introduction
  • Endpoints
  • GETShow library
  • GETShow an image from the library
  • POSTPost a new image to the library

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
401
Unauthorized
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"
  }
}