Reference

This is a flat view of all the representations and relations. If you would rather explore our API starting from the Entry Point, please use the Browser.

Quick reminder:
  • Representation: a set of name-value pairs representing the state of a resource.
  • Relation: the identifier of a link between two resources.

documents

  1. document-representation
  2. create-documents
  3. get-document
  4. get-documents

1. document-representation

Description: A document representation. A document can be a mandate or any document, and is generally related a binary content.

Properties
reference
The document reference. Constraints: Text, Read-Write, 35 characters or less.
label
The document label, which can be used to give a human readable description of the document. Constraints: Text, Read-Write, 140 characters or less.
timestamped
A flag specifying if the document should be/is timestamped. Constraints: Boolean, Read-Write.
timestamp
The document timestamp with regards to RFC 3161. Constraints: DateTime, Read-Only.
dateCreated
The creation date. Constraints: DateTime, Read-Only.
dateSigned
The signed date. Constraints: DateTime, Read-Only.

2. create-documents (relation)

Description: Create a document.

Properties
reference
The document reference. Constraints: Text, Read-Write, 35 characters or less.
timestamped
A flag specifying if the document should be/is timestamped. Constraints: Boolean, Read-Write.
creditor » reference
The creditor reference within the SlimPay referential. This reference is given by SlimPay. Constraints: Text, 35 characters or less, Read-Write.
creditor » entity » reference
The entity reference within the SlimPay referential. It is is given by SlimPay. Constraints: Text, 35 characters or less, Read-Only.
binaryContent » contentType
The MIME type of the binary-content. Example: application/pdf. Constraints: Text, Read-Write.
binaryContent » contentEncoding
The content encoding. Constraints: Text among Base64, Read-Write.
binaryContent » content
The actual binary content. Constraints: Text, Read-Write.
Example: Create and timestamp a PDF document by subscriber reference
Request
POST follow(https://api.slimpay.net/alps#create-documents) HTTP/1.1
Accept: application/hal+json; profile="https://api.slimpay.net/alps/v1"
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6WyJhcGkiXSwiZXhwIjoxNDg4NDc0NzI1LCJqdGkiOiI3OThhNGEyYy1hOGE4LTQwNmItOGY0YS1mMjE3ZmNhMTM5YjciLCJjbGllbnRfaWQiOiJkZW1vY3JlZGl0b3IwMSJ9.VoN5FoWOoPfLkJU15ZIcYp2iRam4WJoVfMBw_35XCkw

{
    "label": "My Document",
    "timestamped": true,
    "creditor": {
        "reference": "democreditor"
    },
    "binaryContent": {
        "content": "JVBERi0xLjQKJeLjz9MKMiAwIG9iago8PC9MZW5ndGggOTQvRmlsdGVyL0ZsYXRlRGVjb2RlPj5zdHJlYW0KeJwr5HIK4TI2U7AwMFMISeEyUNA1tAAx9N0MFQyNFELSuDQ8UnNy8hXC84tyUhQVwlNTFNxSkxSAqgyNrAyMrYwsFZxdQxSMDAxNNUOygAYYgLS7hnAFcgEA5PgVTwplbmRzdHJlYW0KZW5kb2JqCjQgMCBvYmoKPDwvUGFyZW50IDMgMCBSL0NvbnRlbnRzIDIgMCBSL1R5cGUvUGFnZS9SZXNvdXJjZXM8PC9Qcm9jU2V0IFsvUERGIC9UZXh0IC9JbWFnZUIgL0ltYWdlQyAvSW1hZ2VJXS9Gb250PDwvRjEgMSAwIFI+Pj4+L01lZGlhQm94WzAgMCA1OTUgODQyXT4+CmVuZG9iagoxIDAgb2JqCjw8L0Jhc2VGb250L0hlbHZldGljYS9UeXBlL0ZvbnQvRW5jb2RpbmcvV2luQW5zaUVuY29kaW5nL1N1YnR5cGUvVHlwZTE+PgplbmRvYmoKMyAwIG9iago8PC9UeXBlL1BhZ2VzL0NvdW50IDEvS2lkc1s0IDAgUl0+PgplbmRvYmoKNSAwIG9iago8PC9UeXBlL0NhdGFsb2cvUGFnZXMgMyAwIFI+PgplbmRvYmoKNiAwIG9iago8PC9Qcm9kdWNlcihpVGV4dK4gNS40LjEgqTIwMDAtMjAxMiAxVDNYVCBCVkJBIFwoQUdQTC12ZXJzaW9uXCkpL01vZERhdGUoRDoyMDE1MDIxODEyMDMyOSswMScwMCcpL0NyZWF0aW9uRGF0ZShEOjIwMTUwMjE4MTIwMzI5KzAxJzAwJyk+PgplbmRvYmoKeHJlZgowIDcKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMzMyIDAwMDAwIG4gCjAwMDAwMDAwMTUgMDAwMDAgbiAKMDAwMDAwMDQyMCAwMDAwMCBuIAowMDAwMDAwMTc1IDAwMDAwIG4gCjAwMDAwMDA0NzEgMDAwMDAgbiAKMDAwMDAwMDUxNiAwMDAwMCBuIAp0cmFpbGVyCjw8L1Jvb3QgNSAwIFIvSUQgWzwzZWRhMDI0N2RmYjE4NGZlNDY2ODZkZTEyYWU5OTQyZT48NmQyODVkNzBlYTg0ZGZhZjhhNDAxNzcxOGVlMjM0ZTU+XS9JbmZvIDYgMCBSL1NpemUgNz4+CiVpVGV4dC01LjQuMQpzdGFydHhyZWYKNjY5CiUlRU9GCg=="
    }
}
Response
HTTP/1.1 201 Created
Content-Type: application/hal+json; profile="https://api.slimpay.net/alps/v1";charset=UTF-8
Content-Length: 834

{
    "creditor": {
        "reference": "democreditor"
    },
    "dateCreated": "2017-03-02T16:55:37.000+0000",
    "label": "My Document",
    "reference": "po8UMHrAHZxdv8XwXb9pgZVSMvoUO0DicmF",
    "timestamp": "2017-03-02T16:55:37.000+0000",
    "timestamped": true,
    "_links": {
        "https://api.slimpay.net/alps#get-binary-content": {
            "href": "https://api-sandbox.slimpay.net/creditors/democreditor/documents/po8UMHrAHZxdv8XwXb9pgZVSMvoUO0DicmF/content"
        },
        "self": {
            "href": "https://api-sandbox.slimpay.net/creditors/democreditor/documents/po8UMHrAHZxdv8XwXb9pgZVSMvoUO0DicmF"
        },
        "https://api.slimpay.net/alps#get-creditor": {
            "href": "https://api-sandbox.slimpay.net/creditors/democreditor"
        },
        "profile": {
            "href": "https://api-sandbox.slimpay.net/alps/v1/documents"
        }
    }
}

3. get-document (relation)

Description: Get one document.

Properties

No dynamic property needed. This usually means that the server already took the liberty to build the full URL for you depending on the context. Less code for you!

4. get-documents (relation)

Description: Get one document. Both creditorReference and reference are mandatory.

Properties
creditorReference
The creditor reference within the SlimPay referential. This reference is given by SlimPay. Constraints: Text, 35 characters or less, Read-Write.
entityReference
The entity reference within the SlimPay referential. It is is given by SlimPay. Constraints: Text, 35 characters or less, Read-Only.
reference
The document reference. Constraints: Text, Read-Write, 35 characters or less.
Example: Get one document by reference
Request
GET follow(https://api.slimpay.net/alps#get-documents) HTTP/1.1
Accept: application/hal+json; profile="https://api.slimpay.net/alps/v1"
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6WyJhcGkiXSwiZXhwIjoxNDg4NDc0NzI1LCJqdGkiOiI3OThhNGEyYy1hOGE4LTQwNmItOGY0YS1mMjE3ZmNhMTM5YjciLCJjbGllbnRfaWQiOiJkZW1vY3JlZGl0b3IwMSJ9.VoN5FoWOoPfLkJU15ZIcYp2iRam4WJoVfMBw_35XCkw
Response
HTTP/1.1 200 OK
Content-Type: application/hal+json; profile="https://api.slimpay.net/alps/v1";charset=UTF-8
Content-Length: 779

{
    "dateCreated": "2015-09-23T12:48:24.000+0000",
    "label": "My Document",
    "reference": "T6Y8bPRD1aYAhWZzI7IQym6TYPjsDffL6AS",
    "timestamp": "2015-09-23T12:48:14.000+0000",
    "timestamped": true,
    "_links": {
        "https://api.slimpay.net/alps#get-binary-content": {
            "href": "https://api-sandbox.slimpay.net/creditors/democreditor/documents/T6Y8bPRD1aYAhWZzI7IQym6TYPjsDffL6AS/content"
        },
        "self": {
            "href": "https://api-sandbox.slimpay.net/creditors/democreditor/documents/T6Y8bPRD1aYAhWZzI7IQym6TYPjsDffL6AS"
        },
        "https://api.slimpay.net/alps#get-creditor": {
            "href": "https://api-sandbox.slimpay.net/creditors/democreditor"
        },
        "profile": {
            "href": "https://api-sandbox.slimpay.net/alps/v1/documents"
        }
    }
}