Useme API docs
  1. Deals
Useme API docs
  • Guides
    • Introduction
    • Getting Started
    • Creating Contractors
    • Creating Deals
  • Reference
    • Categories
      • List categories
    • Contractors
      • Create a new contractor
    • Deals
      • Create a new deal
        POST
      • Retrieve a specific deal
        GET
      • Upload a file for a deal
        POST
  1. Deals

Create a new deal

POST
https://sandbox.useme.com/api/1.0/deal/
Deals
Creates a new deal with the provided details. This operation involves registering the deal and creating related deal stages.

Request

Header Params
Authorization
string 
required
Authorization token for the sandbox environment.
Default:
Token <here-paste-your-token>
Body Params application/json
partner_id
string 
Name
required
The deal ID in your system. Must be unique.
>= 1 characters<= 40 characters
contractor_email
string <email>
E-mail
required
Contractor's e-mail address - must be already present within Useme system
>= 1 characters
name
string 
required
Name of the deal
>= 1 characters<= 200 characters
description
string 
required
Description of the deal
>= 1 characters
budget
string <decimal>
required
Invoice amount (Contract value)
Match pattern:
^-?\d{0,18}(?:\.\d{0,2})?$
currency
string 
Deal currency
required
Currency of the deal
>= 3 characters<= 3 characters
work_days
integer 
Days of work
optional
Number of days of work. Default: 30.
Default:
30
sub_category_id
integer 
subcategory id
required
The subcategory ID
Example
{
  "partner_id": "unique-ID-of-deal",
  "contractor_email": "user@example.com",
  "name": "Deal name",
  "description": "Deal description",
  "budget": "1000.00",
  "currency": "EUR",
  "work_days": 30,
  "sub_category_id": 75
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://sandbox.useme.com/api/1.0/deal/' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "partner_id": "unique-ID-of-deal",
    "contractor_email": "user@example.com",
    "name": "Deal name",
    "description": "Deal description",
    "budget": "1000.00",
    "currency": "EUR",
    "work_days": 30,
    "sub_category_id": 75
}'

Responses

🟢201Returns the newly created deal's ID and associated stage IDs.
application/json
Body
success
boolean 
optional
Default:
true
data
object (DealStageData) 
required
id
integer 
required
The ID of the newly created deal.
stage_ids
array[integer]
required
List of IDs for the stages associated with the newly created deal.
Example
{
  "success": true,
  "data": {
    "id": 0,
    "stage_ids": [
      0
    ]
  }
}
🟠400Invalid input parameters or validation errors.
🟠409Indicates that the deal already exists.
Modified at 2024-05-07 08:34:28
Previous
Create a new contractor
Next
Retrieve a specific deal
Built with