# Search for product transactions

Lists the product lines of the Location, newest first. Deleted lines are not listed. A line reports its Team Member and client only when it belongs to a sale, and its Supplier only when it belongs to a receipt; otherwise these fields are empty arrays.

Endpoint: GET /storages/transactions/{location_id}
Version: 1.0.0
Security: BearerPartnerUser

## Security:

  - `BearerPartnerUser` (unknown)
    http bearer Bearer {PartnerToken}, User {UserToken}

## Path parameters:

  - `location_id` (number, required)
    location ID

## Query parameters:

  - `page` (number)
    page number

  - `count` (number)
    number of transactions per page

  - `start_date` (string)
    period start date

  - `end_date` (string)
    period end date

  - `document_id` (string)
    Document ID

  - `changed_after` (string)
    Filtering product transactions modified/created since a specific date and time

  - `changed_before` (string)
    Filtering product transactions modified/created before a specific date and time

## Header parameters:

  - `Accept` (string, required)
    e.g. application/vnd.api.v2+json

  - `Content-Type` (string, required)
    application/json

  - `Authorization` (string, required)
    Bearer partner_token, User user_token

## Response 200:

  - `200` (unknown)
    OK

## Response 200 fields (application/json):

  - `success` (boolean)
    Execution success status (true)

  - `data` (array)
    Array of objects with data

  - `data.id` (number)
    Transaction ID

  - `data.document_id` (number)
    Document ID

  - `data.type_id` (number)
    Transaction type identifier

  - `data.type` (string)
    Transaction type

  - `data.good` (object)
    Product

  - `data.good.id` (number)
    Product ID

  - `data.good.title` (string)
    Product Name

  - `data.storage` (object)
    Inventory

  - `data.storage.id` (number)
    Inventory ID

  - `data.storage.title` (string)
    Inventory name

  - `data.unit` (object)
    Unit of measurement

  - `data.unit.id` (number)
    Unit ID

  - `data.unit.title` (string)
    Unit name

  - `data.operation_unit_type` (number)
    Unit the quantity is counted in: 1 sale unit, 2 service unit

  - `data.amount` (number)
    Quantity with a sign: negative when the stock goes down (sale, consumption, write-off)

  - `data.comment` (string)
    A comment

  - `data.create_date` (string)
    date of creation

  - `data.last_change_date` (string)
    Last modified date

  - `data.cost_per_unit` (number)
    Unit price

  - `data.cost` (number)
    Price

  - `data.discount` (number)
    Discount

  - `data.master` (any)
    Team Member of a sale; an empty array when the line has none, as on a receipt or a write-off

  - `data.master.id` (number)
    Team Member ID

  - `data.master.title` (string)
    Team Member name

  - `data.supplier` (any)
    Supplier of a receipt; an empty array when the line has none

  - `data.supplier.id` (number)
    Supplier ID

  - `data.supplier.title` (string)
    Supplier name

  - `data.record_id` (number)
    Appointment ID

  - `data.service` (any)
    Service of an appointment consumable; an empty array when the line has none

  - `data.service.id` (number)
    Service ID

  - `data.service.title` (string)
    Service name

  - `data.client` (any)
    Client of a sale; an empty array when the line has none

  - `data.client.id` (number)
    Client ID

  - `data.client.name` (string)
    Client name

  - `data.client.phone` (string)
    Client phone number

  - `data.loyalty_abonement_id` (number)
    ID of the membership sold by the line; 0 when none

  - `data.loyalty_certificate_id` (number)
    ID of the gift card sold by the line; 0 when none

  - `meta` (array)
    Metadata (empty array)

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/json):

  - `success` (boolean)
    Response status.
    Example: false

  - `data` (object | null)
    Response data.
    Example: null

  - `meta` (object)
    Additional response data.

  - `meta.message` (string)
    Error message.
    Example: Authentication needed.

## Response 403:

  - `403` (unknown)
    Forbidden

## Response 403 fields (application/json):

  - `success` (boolean)
    Response status.
    Example: false

  - `data` (object | null)
    Response data.
    Example: null

  - `meta` (object)
    Additional response data.

  - `meta.message` (string)
    Error message.
    Example: Access denied.

## Response 404:

  - `404` (unknown)
    Not Found

## Response 404 fields (application/json):

  - `success` (boolean)
    Response status.
    Example: false

  - `data` (object | null)
    Response data.
    Example: null

  - `meta` (object | array)
    Additional response data (empty object or empty array)
    Example: {}

