Memento Payments
Search…
⌃K

Images

The image object

Attribute
Type
Description
id
uuid
The unique identifier for the image.
url
string
The URL of the full screen version of the image.
cropped_url
string
The URL of the UI (cropped) version of the image.
thumbnail_url
string
The URL of the thumbnail version of the image.
meta
string
A JSON object which can store meta data used by the client.
created_at
time
The time when the image was created.
updated_at
time
The time when the image was updated.

Example

{
"id": "75cc21be-fe47-4702-74bc-07b84beed5fb",
"url": "https://{imagehost}/dd72ebb8-db1f-4442-b203-095ac9ded974/75cc21be-fe47-4702-74bc-07b84beed5fb_original.jpg",
"cropped_url": "https://{imagehost}/dd72ebb8-db1f-4442-b203-095ac9ded974/75cc21be-fe47-4702-74bc-07b84beed5fb_cropped.jpg",
"thumbnail_url": "https://{imagehost}/dd72ebb8-db1f-4442-b203-095ac9ded974/75cc21be-fe47-4702-74bc-07b84beed5fb_thumbnail.jpg",
"description": "Image description.",
"meta": "",
"created_at": "2017-09-04T12:26:43.403883Z",
"updated_at": "2017-09-04T12:26:43.403883Z"
}

Upload an image

Upload an image using multipart form data. The following parameters are available. One of the following fields must be specified in order to upload an image: file, encoded or url.
Request
Response
POST /v1/images
Parameter
Type
Description
file
data
The file data.
encoded
string
The entire image base64 encoded.
url
string
Fetch image from a URL.
crop
string
The coordinates for which to crop the image, in the format of "x0,x1,y0,y1".
user_image
boolean
Set true if this is a profile picture for the user.
payment_id
uuid
If applicable, the unique identifier for a payment for which this image is intended.
payment_request_id
uuid
If applicable, the unique identifier for a payment request for which this image is intended.
pool_id
uuid
If applicable, the unique identifier for a pool for which this image is intended.
curl -X POST \
-F "crop=0,0,300,100" \
-F "payment_id=525d62a7-9d4f-4161-bf91-0f6f6edcd77e" \
-H "Project-ID: ab614ec6-b018-4fab-b93e-519dec999d1e" \
-H "Idempotency-Key: 773ae064-6e5f-45db-a680-b8dad48e0e42" \
-H "Content-Type: multipart/form-data" \
-H "Authorization: Bearer wxKj3JV6ET1dXVou77675tMqC..." \
"https://api.mementopayments.com/v1/images"
201 Created
Returns an image object.