---
title: "Close sale"
method: PUT
path: "/api/files/sales/{saleGuid}/close"
tags: ["Sales"]
---

# Close sale

`PUT /api/files/sales/{saleGuid}/close`

Closes a sale by setting its status to Closed (60) and recording the actual closing date. Returns 422 if the sale is already Closed, Archived, or a Dead Deal. Note: setting ActualClosingDate on PUT /api/files/sales/{id} also closes a sale implicitly — this endpoint is the preferred explicit form.

### Validation & Requirements
#### Required Parameters
- `saleGuid` (path, string, format=guid)
- `form` (body, object)

#### Required JSON Body Fields
- `actualClosingDate` (format=date-time, minLength=1)

#### Validations
- Invalid GUID values in `*Guid`/`*Guids` fields return `422 Unprocessable Entity`.
- Invalid date values in `*date*` fields return `422 Unprocessable Entity`.
- Missing required request body returns `422 Unprocessable Entity` with `Missing request body.`.
- Additional business-rule validation may return `422` with details in the `errors` array.

#### Integration Requirement
- Retrieve the corresponding `...Form` endpoint immediately before write operations to get current dynamic required fields and allowed values.

## Path parameters

- `saleGuid` string, guid, required

## Request body

- CloseSaleForm
  - `actualClosingDate` string, date-time, required

## Response `200`

- LinkedResponseOfCloseSaleResponse
  - `value` CloseSaleResponse
  - `warnings` string[], nullable
  - `links` Link[], nullable
    - `href` string, nullable
    - `rel` string, nullable
    - `method` string, nullable

## Other responses

- `404`
- `422`

---

[API](https://skmtc.net/skyslope/apis/skyslope-api.md) · [All operations](https://skmtc.net/skyslope/apis/skyslope-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/skyslope/skyslope-api/revisions/bad0d2db9b7a/schema)
