Yay.com loading

Loading

  • My Shopping Cart (0) £0.00

  • Register

Customer Management

API Access

Build custom apps using our JSON API

FREE
Get your free API Key

Documents

A Document is a file that can be used for verification of required information for certain actions on an account

Get your free API Key

Filter:

  • All
  • GET
  • POST
  • PUT
  • DELETE
  • Chargeable *

* You will be charged every time this command is run.

  • GET/account/document

    Gets a list of all documents on the account

    Back to top

    Request Details

    Response Details

    Request Details

    This command has no URL/Query String parameters

    Response Details

    200 Response

    {
        "result" : [
            {
                "uuid" : "31347d42-00bd-44a5-9b5c-20dc4197a2f6",
                "file_name" : "Pete's Passport.png",
                "content_type" : "image/png",
                "created_on" : "2017-03-28"
            }
        ],
        "status_code" : 200,
        "status_message" : "OK"
    }
  • GET/account/document/{uuid}

    Gets a specific document on the account

    Back to top

    Request Details

    Response Details

    Request Details

    This command has no URL/Query String parameters

    Response Details

    200 Response

    {
        "result" : {
            "uuid" : "31347d42-00bd-44a5-9b5c-20dc4197a2f6",
            "file_name" : "Pete's Passport.png",
            "content_type" : "image/png",
            "created_on" : "2017-03-28"
        },
        "status_code" : 200,
        "status_message" : "OK"
    }
  • POST/account/document

    Creates a new document on the account. The currently accepted content types are: 'application/pdf', 'image/png', 'image/jpeg', 'image/gif', 'image/tiff'.

    Back to top

    Request Details

    Response Details

    Request Details

    This command has no URL/Query String parameters

    POST body

    • Name

    • Type

    • Required

      • content

      • String

      • True

      The Base64 encoded file content

      • content_type

      • String

      • True

      The content type of the file to be uploaded

      • file_name

      • String

      • True

      The name of the document

    JSON all-fields example:

    {
        "file_name" : "Pete's Passport.png",
        "content_type" : "image/png",
        "content" : "WW91ciBmaWxlIGNvbnRlbnQgZ29lcyBoZXJlLg=="
    }

    Response Details

    201 Response

    {
        "result" : {
            "uuid" : "31347d42-00bd-44a5-9b5c-20dc4197a2f6",
            "file_name" : "Pete's Passport.png",
            "content_type" : "image/png",
            "created_on" : "2017-03-28"
        },
        "status_code" : 201,
        "status_message" : "Created"
    }

    400 Response

    {
        "result" : {},
        "status_code" : 400,
        "status_message" : "Bad Request"
    }
View Desktop Site