New Light partners with Amesto GlobalLight and Amesto Global Read the announcementRead more

Get purchase request

GET
https://api.light.inc/v1/purchase-requests/{purchaseRequestId}

Returns a purchase request by ID

Permissions checked: purchase-requests/own:read and purchase-requests:read. What a call needs depends on the caller, the record and the request.

Authorization

Send one of these on every request. See Authentication for how to get credentials.

  • API key

    Basic authentication header of the form Basic <api_key>, where <api_key> is your api key.

  • Bearer token

Path parameters

  • purchaseRequestId string · uuidrequired

Response

  • id string · uuid

  • companyId string · uuid

  • companyEntityId string · uuid

  • purchaseRequestNumber integer · int64

  • description string

  • status string

    ⚠️ This enum is not exhaustive; new values may be added in the future.

    One of APPROVED CANCELLED CANCEL_PENDING FAILED IN_REVIEW REJECTED

  • vendorId string · uuid

  • currency string

  • amount integer · int64

  • outcome object

    • type string

      ⚠️ This enum is not exhaustive; new values may be added in the future.

      One of PURCHASE_ORDER VENDOR_CARD

  • failureContext object

    Failure context when vendor onboarding fails.

    • name string

      The error name

    • type string

      The error type

      ⚠️ This enum is not exhaustive; new values may be added in the future.

      One of BAD_REQUEST UNAUTHORIZED FORBIDDEN NOT_FOUND CONFLICT UNPROCESSABLE_CONTENT

    • errors array of object

      List of errors providing details about what went wrong

      • type string

        A string code identifying the error type

      • message string

        A human-readable message providing more details about the error

      • path array of string

        Optional path of the error when the error is for a specific field. Used mostly on BAD_REQUEST errors, that path will match the field name on the request object

      • context object

        Optional context providing additional information about the error. This can include any relevant data that might help in understanding or resolving the error

  • createdBy string · uuid

  • requestedBy string · uuid

  • createdAt string · date-time

  • updatedAt string · date-time

  • customProperties array of object

    • groupId string · uuid

      ID of the custom property group

    • groupInternalName string

      Internal name of the custom property group

    • values array of object

      List of values. Note that this will be a single value unless the group input type supports multiple values

      • id string · uuid

        Unique identifier for the object

      • groupId string · uuid

        ID of the custom property group

      • groupInternalName string

        Internal name of the custom property group

      • companyId string · uuid

        ID of the company

      • internalName string

        Internal name of the custom property value

      • label string

        Label of the custom property value

      • context string

        Context/description of the custom property value

      • createdAt string · date-time

        Timestamp when the custom property value was created

      • updatedAt string · date-time

        Timestamp when the custom property value was last updated

      • attachment object

        File assigned to an ATTACHMENT property. Null for other property types.

        • id string · uuid

          Attachment ID. Use GET /v1/attachments/{attachmentId}/document to download the file.

        • fileName string

        • contentType string