> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.wisboo.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.wisboo.com/_mcp/server.

# Update product access

PUT https://api.wisboo.com/v1/stores/{store_id}/product_accesses/{id}
Content-Type: application/json

Permite actualizar la fecha tope de acceso o el status del acceso de un usuario a un producto.

Reference: https://docs.wisboo.com/wisboo-api/product-access/update-product-access

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `store_id` (string, required) — ID de la cuenta
- `id` (string, required) — ID del acceso

### Body (application/json)

This endpoint expects an object.

- `status` (enum, optional)
  - Allowed values: `with_access`, `without_access`
- `access_due_date` (datetime, optional, nullable)

## Response

### 201

Successful request

- `id` (string, optional)
- `created_at` (datetime, optional)
- `started_at` (any, optional, nullable)
- `completed_at` (any, optional, nullable)
- `access_due_date` (any, optional, nullable)
- `expiration_days` (integer, optional)
- `status` (string, optional)
- `grade` (any, optional, nullable)
- `concept_grade` (any, optional, nullable)
- `passed` (boolean, optional)
- `progress` (integer, optional)
- `certificate_url` (any, optional, nullable)
- `product` (V1StoresStoreIdProductAccessesIdPutResponsesContentApplicationJsonSchemaProduct, optional)
- `user` (V1StoresStoreIdProductAccessesIdPutResponsesContentApplicationJsonSchemaUser, optional)

## Errors

### 404 Not Found Error

Record does not exist

- `type` (string, optional)
- `message` (string, optional)
- `timestamp` (datetime, optional)
- `log_id` (string, optional)
- `request_id` (string, optional)

## Types

### V1StoresStoreIdProductAccessesIdPutResponsesContentApplicationJsonSchemaProduct

- `id` (string, optional)
- `slug` (string, optional)
- `type` (string, optional)
- `name` (string, optional)

### V1StoresStoreIdProductAccessesIdPutResponsesContentApplicationJsonSchemaUser

- `id` (string, optional)
- `name` (string, optional)
- `last_name` (string, optional)
- `external_id` (any, optional, nullable)
- `email` (string, optional)

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "id": "string",
  "created_at": "2024-01-15T09:30:00Z",
  "started_at": null,
  "completed_at": null,
  "access_due_date": null,
  "expiration_days": 1,
  "status": "string",
  "grade": null,
  "concept_grade": null,
  "passed": true,
  "progress": 1,
  "certificate_url": null,
  "product": {
    "id": "string",
    "slug": "string",
    "type": "string",
    "name": "string"
  },
  "user": {
    "id": "string",
    "name": "string",
    "last_name": "string",
    "external_id": null,
    "email": "string"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.wisboo.com/v1/stores/store_id/product_accesses/id"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.wisboo.com/v1/stores/store_id/product_accesses/id';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.wisboo.com/v1/stores/store_id/product_accesses/id"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.wisboo.com/v1/stores/store_id/product_accesses/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.wisboo.com/v1/stores/store_id/product_accesses/id")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.wisboo.com/v1/stores/store_id/product_accesses/id', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.wisboo.com/v1/stores/store_id/product_accesses/id");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.wisboo.com/v1/stores/store_id/product_accesses/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```