---
title: Sales History endpoints
slug: sales-history-endpoints
description: Learn how to efficiently use the Pricemoov API to load sales history with this informative document. Discover step-by-step instructions for creating or updating entries in the Sales History table, complete with a handy curl command featuring essential hea
icon: 🔄
createdAt: 2023-03-13T15:11:07.000Z
---

# Quick reference

| Verb | Path                                            | Method              |
| ---- | ----------------------------------------------- | ------------------- |
| POST | /api/v1/sales\_history/bulk\_create\_or\_update | Upsert sale entries |

# Loading Sales History into Pricemoov

## Description

With our API, you can easily create or update entries in our Sales History table. This table keeps track of all your sales, including the product sold, the date of the sale, and the profit information.

```shell
curl --location --request POST 'https://api.pricemoov.com/api/v1/sales_history/bulk_create_or_update/' \
--header 'Authorization: jwt <your_token>' \
--header 'Content-Type: application/json' \
--raw-data '[
		{
			"transaction_id": "TR_0001",
			"transaction_date": "2022-03-10T16:05:24Z",
			"price_list_name": "PL_0001",
			"price_dimension": "Price",
			"code": "123AZERTY",
			"extension": "EBFG9J",
			"client_code": "CL_0001",
			"agreement_code": "AG_0001",
			"departure_date": "2022-03-10T16:05:24Z",
			"currency": "EUR",
			"revenue": "20",
			"quantity": "2",
			"active_price": "10"
		}, ...
]'
```

## Parameters

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
`transaction_id`



`price_list_name`



`price_dimension`



`code`



`extension`



`quantity`



`active_price`



`client_code`



`agreement_code`



`departure_date`



`revenue`
:::

:::VerticalSplitItem
`type: string`, `default: unknown`, `Required`

unique identifier

`type: string`, `default: unknown`, `Optional`

Name of the price list linked to the transaction

`type: string`, `default: unknown`, `Optional`

Price dimension

`type: string`, `default: unknown`, `Required`

Product code

`type: string`, `default: unknown`, `Required`

extension

`type: string`, `default: unknown`, `Required`

Quantity sold

`type: string`, `default: unknown`, `Required`

Transaction price

`type: string`, `default: unknown`, `Optional`

Client code

`type: string`, `default: unknown`, `Optional`

Agreement code

`type: string`, `default: unknown`, `Optional`

Departure date

`type: string`, `default: unknown`, `Required`

Transaction revenue
:::
::::

## Example

Upon success, the response is 201 OK and returns

```json
[
    1,2,3 // ids_created
]
```

