Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developers.projectcor.com/llms.txt

Use this file to discover all available pages before exploring further.

Claude Code is Anthropic’s official CLI tool. This guide shows how to configure Claude Code with context about COR APIs for building integrations.

Prerequisites

  • Active Claude subscription (Pro, Max, or API access)
  • COR API credentials (API Key and Client Secret)

Setup

  1. Install Claude Code globally:
npm install -g @anthropic-ai/claude-code
  1. Navigate to your project directory.
  2. Add the CLAUDE.md file below to your project root.
  3. Run claude to start.

Create CLAUDE.md

Create a CLAUDE.md file at the root of your project to provide Claude Code with COR API context:
# COR API Integration

## Working Relationship

- Ask for clarification rather than making assumptions about API usage
- Verify endpoint paths and required fields before generating code
- Reference the COR API documentation when uncertain

## COR Platform

COR is a project management platform for agencies. Three APIs are available:

| API | Base URL |
|-----|----------|
| Main API | `https://api.projectcor.com/v1` |
| Resource Allocation | `https://planner.svc.v2.projectcor.com` |
| Integrations | `https://integrations.projectcor.com` |

## Authentication

OAuth 2.0 with Bearer tokens (same token for all APIs).

```bash
# Get token
curl -X POST 'https://api.projectcor.com/v1/oauth/token?grant_type=client_credentials' \
  -H 'Authorization: Basic BASE64(API_KEY:CLIENT_SECRET)'

# Use token
Authorization: Bearer ACCESS_TOKEN
```

## Main API Entities

- **Clients** `/clients` - Customer accounts
- **Projects** `/projects` - Project management
- **Tasks** `/tasks` - Task tracking
- **Hours** `/hours` - Time entries
- **Users** `/users` - Team members
- **Brands** `/brands` - Client brands
- **Products** `/products` - Brand products

### User Roles

`1` C-Level, `2` Director, `3` Project Manager, `4` Collaborator, `5` Freelancer, `6` Client

### Task Status

`nueva` (new), `en_proceso` (in progress), `estancada` (stalled), `finalizada` (completed)

### Project Status

`in_process`, `finished`, `suspended`

## Data Conventions

### Pagination

```json
{"total": "45", "perPage": 20, "page": 1, "lastPage": 3, "data": [...]}
```

- `page`: Page number (default 1, set `false` for all)
- `perPage`: Items per page (default 20)

### Filters

URL-encoded JSON: `?filters=%7B%22client_id%22%3A123%7D`

### Dates

Request: `YYYY-MM-DD` | Response: `YYYY-MM-DD HH:mm:ss`

## Resource Allocation API

Manages user capacity on projects.

### Endpoints

- `POST /allocation/saveAllocation` - Create
- `PUT /allocation/updateAllocation` - Update
- `DELETE /allocation/removeAllocation` - Delete
- `GET /allocation/getAllocations/{projectId}` - List

### Allocation Object

```json
{
  "userId": 1111,
  "companyId": 1111,
  "resource": {"typeId": "Project", "entityId": 1111},
  "from": "2024-06-01",
  "to": "2024-10-31",
  "assignedByUserId": 11111,
  "allocatedHours": 20
}
```

### Validation

- `from` < `to`, max 12 months range
- No overlapping allocations
- `allocatedHours` required

## Integrations API

Syncs external systems (Salesforce, Jira, SAP, Okta, etc.) with COR.

### Required: metadata.source

```json
{
  "metadata": {"source": "SALESFORCE"},
  "id": "external-id",
  "name": "Entity Name"
}
```

### Sources

`JIRA`, `SALESFORCE`, `ADVERTMIND`, `QUICKBOOKS`, `ZAPIER`, `OKTA`, `MICROSOFT_DYNAMICS`, `GITHUB`, `MICROSOFT_TEAMS`, `VBS`, `SAP`, `GLOBANT`

### Entities

Projects, Clients, Users, Working Time, Contracts, Workspaces, Brands

### Error Codes

`ZC001` Generic, `ZC002` Validation, `ZC003` API Request, `ZC004` Query, `ZC005` External Request

## HTTP Status Codes

`200` OK, `201` Created, `400` Bad Request, `401` Unauthorized, `403` Forbidden, `404` Not Found, `422` Validation Error, `429` Rate Limited, `500` Server Error

## Do Not

- Hardcode API credentials in source code
- Skip token refresh handling
- Ignore pagination on list endpoints
- Omit `metadata.source` on Integration API calls
- Send invalid date formats (use YYYY-MM-DD)
- Create overlapping resource allocations