Position Green API: Suppliers

Modified on Tue, 21 Jul at 9:45 AM

TABLE OF CONTENTS


Check the Supplier section and Email section on our Swagger page.


Get Suppliers List

Retrieves a paginated list of suppliers for the current tenant with optional filtering.

GET https://api.positiongreen.com/v1/suppliers/list


Query Parameters

NameTypeDescription
Idstring (uuid)Optional unique identifier to filter by a specific supplier.
PrettyIdstringOptional pretty ID to filter by.
YearIdstring (uuid)Optional year identifier to filter suppliers by specific year. Defaults to active year if omitted.


Response Example (200 OK)

{
  "totalCount": 1,
  "items": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "globalId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "name": "Acme Supplier Logistics",
      "yearId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "prettyId": "acme-logistics",
      "parentId": null,
      "organizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
    }
  ]
}


Get Supplier

Retrieves detailed information about a specific supplier by its prettyId.

GET https://api.positiongreen.com/v1/suppliers


Query Parameters

NameTypeDescription
prettyId*stringRequired. The pretty ID of the supplier to retrieve.


Response Example (200 OK)

{
  "supplierPrettyId": "acme-logistics",
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "name": "Acme Supplier Logistics",
  "contactId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "contactFirstName": "John",
  "contactLastName": "Doe",
  "contactEmail": "john.doe@acme.com",
  "language": "en"
}


Create New Supplier

Creates a new supplier in Position Green Platform.

POST https://api.positiongreen.com/v1/suppliers


Request Body Parameters

ParameterRequiredTypeDescription
supplierPrettyIdNonullable stringUnique external identifier for the supplier (e.g., acme-logistics).
nameNonullable stringName of the supplier organization.
contactFirstNameNonullable stringFirst name of the main contact person.
contactLastNameNonullable stringLast name of the main contact person.
contactEmailNonullable stringEmail address of the main contact person.
tagsNonullable string[]Optional list of tags to associate with the supplier.


Response Example (200 OK)

{
  "supplierPrettyId": "acme-logistics",
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "contactId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}


Update a Supplier

Updates an existing supplier's contact information and tags.

PUT https://api.positiongreen.com/v1/suppliers/{supplierId}


Path Parameters

supplierId*string (uuid)Required. The unique identifier of the supplier to update.


Request Body Parameters

ParameterRequiredTypeDescription
contactFirstNameNonullable stringUpdated first name of the main contact person.
contactLastNameNonullable stringUpdated last name of the main contact person.
contactEmailNonullable stringUpdated email address of the main contact person.
tagsNonullable string[]Updated array of tags.


Response Example (200 OK)

{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "contactId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}


Delete Supplier

Deletes a supplier from Position Green Platform.

DELETE https://api.positiongreen.com/v1/suppliers/{supplierId}


Path Parameters

supplierId*string (uuid)Required. The unique identifier of the supplier to delete.


Responses

200 OK SuccessSuccessfully deleted the supplier.
401 UnauthorizedAuthentication required.
404 Not FoundSupplier not found with the specified ID.
500 Server ErrorInternal server error occurred during supplier deletion.


Get Email Templates

Retrieves a list of all available email templates for the authenticated tenant, including built-in and custom templates.

GET https://api.positiongreen.com/v1/email/GetEmailTemplates


Response Example (200 OK)

[
  {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "name": "Supplier Questionnaire Invitation",
    "description": "Default template sent when initiating a questionnaire",
    "builtIn": true,
    "type": "SurveyInvitation",
    "localizations": [
      {
        "culture": "en",
        "displayName": "English"
      }
    ]
  }
]


Send Supplier Email

Sends an email to specified supplier recipients using a selected email template.

POST https://api.positiongreen.com/v1/email/SendSupplierEmail


Request Body Parameters

ParameterRequiredTypeDescription
emailTemplateId*YesstringThe unique identifier of the email template to use.
recipients*YesRecipients[]List of recipients (at least one required).
fromUserIdNonullable string (uuid)Optional user ID to send the email on behalf of.
fromNameConditionalnullable stringSender name to display. Required if fromEmail is provided.
fromEmailNonullable stringOptional sender email address.


Recipients Item Properties

PropertyRequiredTypeDescription
supplierId*Yesstring (uuid)The ID of the supplier organization receiving the email.
userIdConditionalnullable string (uuid)Required if recipientType is set to UserId.
questionnaireIdConditionalnullable string (uuid)Required for certain survey templates or collaborator recipients.
recipientTypeNostring (enum)Recipient role: UserId, Responsible, Collaborators, or ResponsibleAndCollaborators.


Response Example (200 OK)

{
  "sentEmails": 3
}


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article