Create note

The Create note method is used to add a note to an entity in the platform.

POST {{base_url}}/api/v3/resellers/{{reseller_id}}/notes

Authentication

This endpoint requires a JWT access token. Specify the token in the Authorization header using the Bearer authentication scheme:

Authorization: Bearer <JWT_ACCESS_TOKEN>

In Postman, select Bearer Token on the Authorization tab and enter the JWT access token.

Arguments

Name

Parameter Type

Data type

Required/Optional

Description

Content-Type

header

string

Required

Media type of the request. Specify the following: application/vnd.api+json

Accept

header

string

Required

Supported media types of the answer. Specify the following: application/vnd.api+json

base_url

path

string

Required

ActivePlatform URL

reseller_id

path

integer

Required

The ID of the current reseller or any of its downstream resellers (see Viewing and updating reseller general information)

id

form

integer

Required

The ID of the target entity in the platform

type

form

string

Required

The type of the target entity in the platform:

  • account.

  • subscription.

  • order.

content

form

string

Required

The text of the note up to 5000 characters

attachment

form

object

Optional

Information about a file attached to the note


name

form

string

Optional

Required if attachment presents. The name and extension of the attached file


data

form

string

Optional

Required if attachment presents. The attached file in the base64 encoding, including its MIME-type (see Media type). 

The data format:

data:<MIME-type>;base64,'base64 file contents'

Response model

The successful response includes information about the created note, similar to the Get note method. Status: 201 Created.

Request example

XML
POST /api/v3/resellers/1/notes
Host: test.activeplatform.com
Content-Type: application/vnd.api+json
Authorization: Bearer <JWT_ACCESS_TOKEN>
Accept: application/vnd.api+json
JSON
JSON
{
  "data": {
    "attributes": {
      "id": 3056,
      "type": "subscription",
      "content": "Migrated 01.03.2022",
            "attachment":
            {
                "name": "ai_pine.pdf",
                "data": "data:application/pdf;base64,'SSBob2xkIHRoZSBwb3NpdGlvbiBvZiBhIHFhIGVuZ2luZWVyLiBRQSBlbmdpbmVlciByZXNwb25zaWJpbGl0aWVzIGluY2x1ZGUgZGVzaWduaW5nIGFuZCBpbXBsZW1lbnRpbmcgdGVzdHMsIGRlYnVnZ2luZyBhbmQgZGVmaW5pbmcgY29ycmVjdGl2ZSBhY3Rpb25zLiBJIGFsc28gcmV2aWV3IHN5c3RlbSByZXF1aXJlbWVudHMgYW5kIHRyYWNrIHF1YWxpdHkgYXNzdXJhbmNlIG1ldHJpY3MgKGUuZy4gZGVmZWN0IGRlbnNpdGllcyBhbmQgb3BlbiBkZWZlY3QgY291bnRzLikgVGhlIFFBIHRlY2huaWNpYW4gcm9sZSBwbGF5cyBhbiBpbXBvcnRhbnQgcGFydCBpbiBvdXIgY29tcGFueeKAmXMgcHJvZHVjdCBkZXZlbG9wbWVudCBwcm9jZXNzLg=='"
            }
        }
    }
}

Response example

JSON
{
    "data": {
        "id": "15",
        "type": "notes",
        "attributes": {
            "created_at": "2023-03-27T11:35:12.509+03:00",
            "updated_at": "2023-03-27T11:35:12.509+03:00",
            "content": "Migrated 01.03.2022",
            "creator": "Bill Smith",
            "original_link": "/admin/subscription/3056/notes/15",
            "original_id": 3056,
            "original_type": "Subscription",
            "attachment": {
                "name": "ai_pine.pdf",
                "url": "https://storage.test.activeplatform.com/private/uploads/note/attachment/15/ai_pine?expires=1680009898&hash=DStusb6w",
                "size": 3439
            }
        }
    }
}