Get Contract Related Files

Credentials

No credentials are documented for this endpoint.

Allows receiving all files that are stored connected to a specific contract. We can use it to receive all files connected to a contract or just a specific file. To filter by various file types, we will use the following URL to receive the relevant file type - /CONT{GUID}/invoices?=Invoice Receipt

Parameters

Name In Type Required Description
PayMe-Merchant-Key header string no PayMe seller ID
GUID path string yes Doc ID

Request body

Content type: application/json

No Body

Code samples

curl

curl -X GET 'https://sandbox.payme.io/api/payment-contracts/CONT<GUID>/invoices/' \
  -H 'Content-Type: application/json' \
  --data-raw '{}'

Node.js

const response = await fetch("https://sandbox.payme.io/api/payment-contracts/CONT<GUID>/invoices/", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});

console.log(await response.text());

Python

import requests

response = requests.get(
    "https://sandbox.payme.io/api/payment-contracts/CONT<GUID>/invoices/",
    json={},
)

print(response.text)

PHP

<?php

$body = <<<'BODY'
{}
BODY;

$ch = curl_init('https://sandbox.payme.io/api/payment-contracts/CONT<GUID>/invoices/');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => $body,
]);

$response = curl_exec($ch);
curl_close($ch);

echo $response;

Responses

200 — Will return the URL of the file. (success)

Field Type Description
status_code number
invoices array
invoices[].name string
invoices[].mime_type string
invoices[].type string
invoices[].url string A URL that will redirect to the file adderess
invoices[].id string File ID
{
  "status_code": 0,
  "invoices": [
    {
      "name": "test3",
      "mime_type": "image/jpeg",
      "type": "Invoice Receipt",
      "url": "https://reparser2.paymeservice.com/external/files/3e8ce1bb-c6ff-4e05-94df-f24f30928180",
      "id": "INV16477-93808TWJ-IBTSRXKV-1HXJYFXV"
    }
  ]
}